14, February 2012

php and javascript submit() - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: php and javascript submit()
« previous next »
Pages: [1] Print
Instabuck - The easy way to sell digital products online

Author Topic: php and javascript submit()  (Read 2705 times)
Sandwich Artist
*
Posts: 25
186 credits
Members referred : 0


« on: Jun 25, 2008, 09:47:10 pm »

I have several pages where users can enter data as well as click on hyperlinks that use javascript to open a popup where they can enter some more data and then save and the popup will close and the original page will refresh itself automatically.  The issue is that if they enter data on the main page and then click the hyperlink without first saving the page, when they submit on the popup and the main page gets refreshed all of the data they entered on the main page is lost.  Is there any way to have the main page submit before the popup gets opened so that the users don't loose their data.  I've tried using the javascript document.formname.submit() but it just refreshes the page and doesn't submit the data.  I changed all of my submit buttons names from submit to update so as not to cause conflict but it still just refreshes the main page then opens the popup, and all data is lost.  Any ideas on how I could accomplish this task?  Thanks in advance.
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5779
46271 credits
Members referred : 3



« Reply #1 on: Jun 27, 2008, 10:49:59 am »

Maybe you could solve this if you were sending the unsaved data  to the other pages too.

Use an onsubmit="" function to your forms in order to do that.

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=7801
Tags : php javascript submit popup Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: php and javascript submit()
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Feb 14, 2012, 01:09:45 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.