Jump to content

jesh

Members
  • Posts

    2,293
  • Joined

  • Last visited

Posts posted by jesh

  1. If any of those methods in your (amazingly large :)) if statement return an int rather than an object, it would most likely be the cause of your error. You might want to check those methods to see what the return types are.EDIT: I don't understand the language in which this is written, but these look like likely candidates for the cause of the error:.getCodUnidad().getCodAsignatura().getCodContenido().getCodAlumno()Only because I'm assuming "Cod Alumno" translates to something like "Alumni Code".

  2. If you're having trouble with relative paths, you might also try "/GetMess.php". That'll look for the file in your root directory, no matter where the script is executed from. If your GetMess.php file is located at <webroot>/scripts/GetMess.php, then you can access that in your javascript like so:

    var url = "/scripts/GetMess.php";

    If this still doesn't work, load the page in your browser, copy the URL, and use the absolute path instead (e.g. http://www.mysite.com/scripts/GetMess.php.

  3. How does one send more than one variable? like send("q="+Qstr",a="+Astr",e="Etc etc..") ?
    Close. It really just looks like the query string (without the ?). It'd be more like:
    send("q=" + Qstr + "&a=" + Astr + "&e=" + Etc);

    @mseerob: Rather than calling your function in the form like this:

    <form onSubmit="showUsers(this); return false">

    Since your function is expecting a string, you might try passing it like this:

    <form onSubmit="showUsers(this.users.value); return false">

    Then, in your showUsers function, set up the request like this:

    var params = "users=" + str

  4. How about adding text-align: center to the div?

    <html><head><style>div { border: 1px solid red; text-align: center; }</style></head><body><div><img src="http://www.w3schools.com/images/w3default80.jpg" /><img src="http://www.w3schools.com/images/w3default80.jpg" /><img src="http://www.w3schools.com/images/w3default80.jpg" /></div></body></html>

  5. junior high school still
    I'm not intentionally trying to appear callous here, but you're only in junior high. If relationships/love in Norway is anything like what it is in the United States, you'll be dating dozens of girls after this one. What do you have to lose?
  6. Not that I am aware of. I've been forced to either add a new table or insert another column in my existing table:

    operator	 precedence*				1/				2+				3-				4

    SELECT operator FROM myTable ORDER BY precedence ASC

  7. Andrew K has it right. I typically also set the Content-Length header as well:

    var data = "key1=value1&key2=value2&key3=value3";var url="selectusers.php"xmlHttp.onreadystatechange=stateChangedxmlHttp.open("POST",url,true)xmlHttp.setRequestHeader("Content-Type", "application/x-www-urlencoded");xmlHttp.setRequestHeader("Content-Length", data.length);xmlHttp.send(data);

  8. I like to charge a lum sum and generally clients like that so they are not having to worry too much about how long it takes you (unless they have deadline :)).
    I would agree with this, especially considering that this is your first freelance project. Once you have a few projects under your belt, then clients can see that you have experience and will be more willing to be billed hourly.
  9. I believe the thing that is failing is that you are trying to move a tablecell inside of a table. Rather than using a table, you might try using a div instead.Once I changed

    <table><tr><td id="hello"><a href="java script:move()">hello</a></td></tr></table>

    to:

    <div id="hello"><a href="java script:move()">hello</a></div>

    the script worked for me in Firefox.

  10. Maybe if you posted all of your code someone could assist you further. As it is, there is nothing that is calling any of your functions so nothing will happen when you put this code on a page.

  11. W3C-compliant browsers require that you specify a unit when you set the position using javascript.Rather than:

    document.getElementById('hello').style.left=z

    You might try:

    document.getElementById('hello').style.left=z + "px";

  12. If you are sending the email in HTML format, then the <br />s should work just fine. If, on the other hand, you are sending the email in plain-text format, you'll need to keep the "\n"s.plain-text:

    string emailBody = "This is a sample.\n\nThis line has two line breaks above it.\nDone.";

    HTML

    string emailBody = "This is a sample.<br /><br />This line has two line breaks above it.<br />Done.";

    If you are using the System.Net.Mail.MailMessage class to send the email, you can tell it whether to send as plain-text or HTML by using the .IsBodyHtml property:

    MailMessage message = new MailMessage(fromAddress, toAddress);message.Subject = "Subject";message.Body = emailBody;message.IsHtmlBody = true; // or false, depending...

  13. If you are using .NET 2.0, you can use the DefaultButton property on the form element to tell the browser which script to execute when the user hits the Enter key:http://msdn2.microsoft.com/en-us/library/s...aultbutton.aspxOtherwise, or in addition to the above, you can write some client-side javascript that checks for user input to see if the Enter key is pressed. If so, you can call the __doPostBack() function:

    // first, set up the onkeydown (client-side) event handler for the fields where a user// may hit the Enter key.document.getElementById("ChangeInput").onkeydown = CheckForEnter;document.getElementById("SearchInput").onkeydown = CheckForEnter;function CheckForEnter(e){	var charcode;	var target;	e = (e) ? e : window.event;	target = (e.target) ? e.target : e.srcElement;	charcode = (e.which) ? e.which : e.keyCode;	if(charcode == 13)	{		// depending on the ID of the button that sent the event		// we need to call the appropriate __doPostBack() function		if(target.id == "change")		{			__doPostBack('change','');		}		else if (target.id == "search")		{			__doPostBack('search','');		}		return false;	}}

  14. You might try something like this (highly simplified from your example):

    function Scaler(width, height){	this.width = width;	this.height = height;	this.grow = Grow;	this.shrink = Shrink;	function Grow()	{		this.width++;		this.height++;		if(this.width <= 500)			setTimeout("function() {" + this.grow() + "; }", 100);		else			alert(this.width);	}	function Shrink()	{		this.width--;		this.height--;		if(this.width >= 100)			setTimeout("function() {" + this.shrink() + "; }", 100);		else			alert(this.width);	}}var scaler1 = new Scaler(100,100);var scaler2 = new Scaler(45, 45);scaler1.grow();scaler2.grow();

×
×
  • Create New...