473,765 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trouble submitting a form placed in a span filled dynamically by an iframe

4 New Member
I have a page that makes use of a tiny/hidden IFRAME that becomes triggered to load HTML into a SPAN element (via .innerHTML). The SPAN expands to display a form that then needs to be validated with javascript residing in the main window before submitting. I use an onclick from a button below the form to start the validation and submission.

The page works fine in IE, but in FireFox I just can't get it to submit - the FireBug debugger states:

document.forms. um has no properties
checkMessage(un defined)functio ns.pl (line 129)
onclick(click clientX=0, clientY=0)

when I use document.forms["um"].submit();.

It doesn't work with document.um.sub mit() either, nor document.getEle mentById['um'].submit() or document.getEle mentById('um'). submit().

How can I fix this? What does "click clientX=0 clientY=0" have to do with anything (it's nowhere in my code)? The Mozilla javascript reference says to use the forms["um"].submit() version.

Much appreciated!
Evan
May 20 '07 #1
3 1371
pbmods
5,821 Recognized Expert Expert
Heya, erobinso. Welcome to TSDN!

document.forms. um has no properties
checkMessage(un defined)functio ns.pl (line 129)
onclick(click clientX=0, clientY=0)
This is likely because document.forms. um doesn't exist (for whatever reason) when you call document.forms['um'].submit();

To test this, try inserting this line before you submit the form:
Expand|Select|Wrap|Line Numbers
  1. alert(document.forms['um']);
  2.  
May 21 '07 #2
erobinso
4 New Member
Thanks for the welcome! I tested adding the alert(document. frames['um']); both outside of the span (as a button) and within (in the verification script before submit instruction):

In IE, before the span is filled it pops up 'undefined' but after it is filled with the form, it pops up '[object]'.

In Firefox, both before and after, Firebug reports 'document.frame s has no properties' with 'onclick (click clientX=0 clientY=0)' below it. No alert pops up.

So IE seems to see it, but not Firefox!
May 23 '07 #3
erobinso
4 New Member
Cool, I totally solved it by funneling the form data through a URL directed at the IFRAME for a sweet asynchronous response - no form submitting and page reloading required!
Jun 7 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

10
2907
by: Noozer | last post by:
Below is some ASP, HTML and javascript. It is part of a page used to maintain a small database. This code did work at one time, but has since stopped. For some reason the data on my form is not being passed to the page specified in the Action property of the form. This is on a Windows 2000 Pro PC. I copied the code to another server (Windows XP Pro machine) and it DOES work as expected there. The first block is the data located near...
4
2716
by: assgar | last post by:
Hi I am stuck on a problem. I use 3 scripts(form, function and process). Development on win2003 server. Final server will be linux Apache,Mysql and PHP is being used. The form displays multiple dynamic rows with chechboxs, input box for units of service, description of the service and each row has its own dropdown list of unit fees that apply.
2
7053
by: assgar | last post by:
Hi Developemnt on win2003 server. Final server will be linux Apache,Mysql and PHP is being used. I use 2 scripts(form and process). The form displays multiple dynamic rows with chechboxs, input box for units of service, description of the service and each row has its own dropdown list of unit fees that apply. Each dynamically created row will return 3 values fee1_choice, fee1_unit and fee1_money. Note The above informaton is...
5
13379
matheussousuke
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL http://mghospedagem.com/images/controlpanel.jpg instead of http://mghospedagem.comhttp://mghospedagem.com/images/controlpanel.jpg As u see, there's the website URL before the image URL.
0
10156
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9951
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9832
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7375
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5419
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3531
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2805
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.