Jump to content

nuwandias

Members
  • Content Count

    11
  • Joined

  • Last visited

Community Reputation

0 Neutral

About nuwandias

  • Rank
    Newbie
  1. yes guys.... i don't know exactly what was wrong...but it started working all of a sudden.I just cut and pasted the javascript stuff on the page and started working. Anyway, thanks for all your help.Regards,Nuwan
  2. Hi Guys.. Have you ever encountered any issues with javascript when they are written within php files..? Because i have been getting ridiculous errors when i run Javascript code within my php files. One of those issues is that javascript does not recognize the submit function of a form object. It gives an error message saying that the submit function is neither a property or method in the form object. If there is anyone who knows why these kind of error occur, please be kind enough to reply soon.Thanks in advance,Nuwan
  3. Hi Guys.. I've got a form, which submits to php file. The form tag and the submit button is shown below <form name="form1" id="form1" method="post" action="insert.php" onsubmit="return validate(this.form)"><input type="submit" value="Submit" name="subbut"/> I have written a testing function to see when this form gets submitted. This function is show below function validate(thisform){ [indent]if(thisform.name == ""){ alert("return true"); return true; } else{ alert("return false"); return false; }[/indent] } M
  4. Hi Guys.. I have a form, which submits to itself and checks for a condition and gives an error message if the condition is false and redirects the user to a new page if the condition is met. My problem here is redirecting the user to another page. when ever i call the header() function in a page which has html tags included, it gives a warning as shown below.Warning: Cannot modify header information - headers already sent by (output started at F:\xampp\htdocs\Login_Module\register.php:14) in F:\xampp\htdocs\Login_Module\register.php on line 3my code is as follows [indent]i
  5. Thanx buddy, That was the problem. I didn't know that you had to start the session each time. My idea was the session existed until you destroyed it. Thank You, Regards, Nuwan
  6. Hi Guys... I've got a problem in setting a session variable in php. I set a session in one php file as shown below session_start(); $_SESSION['views']=1; And i access this session variable from another php file as shown below. if(isset($_SESSION['views'])){ echo "Welcome ".$_SESSION['views']; } else{ echo "Session not set"; } The result always
  7. I have an image to which i need to give an onclick event. And also i need to change the cursor to hand when the cursor runs over the image. I tried giving the onclick and onmouseover events for the image, but the cursor did not change to hand. I then nested the image inside an anchor tag, now the cursor does change to hand but the alignment of the image goes wrong.I tried by nesting the image inside a div tag and giving it a style by saying 'style="cursor: hand"', but that does not work in firefox. The image that I'm using is quite complicated and not easy to align. Actually I'm using an image
  8. <html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>New Page 1</title><script type="text/javascript"> function setTextInfields(selectList){ for(j=0; j<5; j++){ selectList.options[j] = new Option('Teacher '+j,'t'+j); //new Option('text','value'), takes in the text and value as parameters. } } function populateSecondList(frm){ frm.select2.disabled = false; setTextInfields(frm.select2); } function disableList(){ document.myForm.select2.disa
  9. Hi all..,I've got a marquee tag in my web page. This tag contains images in between. The code is given below.<marquee scrolldelay="50" height="25%" behavior="slide" direction="right"> <img src="small_images/image4s.jpg" /> <img src="small_images/image3s.jpg" /> <img src="small_images/image9s.jpg" /> <img src="small_images/image10s.jpg" /></marquee>But the thing is that this works fine when i open it in IE, but when ever i use Firefox it won't open first time , for the effects of the marquee tag to display i need to open the web page twice. It's only in the
  10. Thanx buddies......., tz working quite fine now....... Regards, Nuwan.
  11. Hi everyone.., I have the following code which sets the inner text of a div tag by JavaScript. But this only works in Internet Explorer, i tried it with Mozilla Firefox but it doesn't work even in the latest version.<html> <head> <title>Test Inner Text </title> <script language="JavaScript"> function setInnerText(){ document.getElementById('tag').innerText = "This is the Inner Text"; } </script> </head> <body> <div id="tag"> </div> <input type="button" value="Click to test" onClick="setInnerText()"/> &l
×
×
  • Create New...