PHP & Frames: passing values to other frame; IE script e

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
crimius
Forum Commoner
Posts: 28
Joined: Sun Oct 13, 2002 6:02 pm
Location: Austin, Texas
Contact:

PHP & Frames: passing values to other frame; IE script e

Post by crimius »

I'm using the following code to pass name/value pairs to another frame in the current frameset:

Code: Select all

<form action="thumbs_index_test.php" method="post" name="search" target="gallery_thumb_index" onSubmit="thumbs_index_test.php">
...
</form>
The frame I'm passing the values to is called "gallery_thumb_index" and contains the file "thumbs_index_test.php".

The error I'm receiving comes in the form of a popup dialog from IE that says, "Problems with this Web page might prevent it from being displayed..." It goes on to give the line #, error etc:

Line: 26
Char: 1
Error: 'thumbs_index_test' is undefined
Code: 0

Line 26 is the very line I quoted above containing the FORM ACTION. "thumbs_index_test" IS defined in the frameset. Is there somewhere else I can "define" it?

A friend spotted the error and I could not reproduce it until I checked "Disable script debugging" AND "Display a notification about every script error" on the Tools | Internet Options | Advanced tab in IE v6.0.

If you click "OK" on the popup error dialog, everything works fine. There doesn't seem to be any real problem except for the annoying error popup if you have those settings that I mentioned above.

Does anyone know how I might be able to fix this so that the error does not come up? I can't find anything wrong with the code/logic, nor with the frameset that defines the pages/files used.

Thanks in advance for any assistance,
-Craig
User avatar
puckeye
Forum Contributor
Posts: 105
Joined: Fri Dec 06, 2002 7:26 pm
Location: Joliette, QC, CA
Contact:

Post by puckeye »

Hi Craig,

The OnSubmit attribute of the FORM tag is an event used to call a JavaScript function. Just remove that attribute and it should work properly.
crimius
Forum Commoner
Posts: 28
Joined: Sun Oct 13, 2002 6:02 pm
Location: Austin, Texas
Contact:

Post by crimius »

doh!

thanks very much. removing the onSubmit attribute worked beautifully.
Post Reply