PDA

View Full Version : Calling javascript inside a div-tag - using PHP



prays
08-28-2008, 02:15 PM
Hi everybody,

I'm currently working on a PHP site, and I have chosen to use javascript for displaying error messages. It works fine in Firefox, but shows "Web page expired" in IE. For example: http://www.waw.dk/beta
And just submit any form, and you'll see.

I have tried a couple of things, and I come to the conclusion, that it is the javascript, particularly the way I call the function. My PHP code checks that every field is filled out properly, and if isn't, it writes the following inside the div-tag:

<script language=\"JavaScript\">
showDialog('Fejl','Error-message here','error',2);
</script>

I hope you can help me, thanks!

magicyte
08-28-2008, 10:47 PM
It would be helpful if you could display the code for easy reading. I do not know what your function does - HOW IT WORKS.

-magicyte