472,328 Members | 1,203 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,328 software developers and data experts.

Submit not returning to the server

I am having a weird problem. I have an application thats default.aspx
page is a menu page when a menu item is selected the requested page is
loaded into default.aspx using iframes. When unsaved changes have been
made to the iframe page and a user selects another item from the
default.aspx menu I want to prompt the user to see if they want to
save changes before going to the selected page.
The problem I am having is that the client form submit call is not
causing the server to be called - unless I put a message box after the
submit. I don't need this message box here but if I remove it the
iframe changes to the selected page without saving the change even if
the use selected to save changes.
Here is the code I am using:
Default.aspx - Client Code
Function MenuHome() 'note this function is called by the onclick event
of the menu item
Dim sSource
sSource = "home.aspx?" & _
"ContactId=" & mlContactId & _
"&FirstName=" & msContactFirstName & _
"&LastName=" & msContactLastName & _
"&UserLevel=" & miUserLevel & _
"&NetUserId=" & msNetUserId & _
"&UserType=" & msUserType

If mbDirty Then
'save changes first before proceeding to selected menu
If InStr(1, iframe.location, "ActionStep.aspx") > 0 Then
iMsgboxResult = MsgBox(PENDING_CHANGES, vbYesNoCancel +
vbQuestion, "Action Step")
If iMsgboxResult = vbYes Then
'call the savechanges of the loaded page
ElseIf iMsgboxResult = vbNo Then
ElseIf imsgboxresult = vbCancel Then
'do nothing
End If
End If
'go the selected menu
End if
End Function

Function MenuClick(sDest)
f.src = sDest
End If
End Function
Iframe page -Client Code
Function SaveChanges()
document.frmActionStep.action = document.frmActionStep.action &
msgbox "Temp Saved" 'note this is what makes it work ??? or calling
document.frmActionStep.submit multiple times ???
End Function
Iframe page - Server Code
If Request.QueryString("Save") = "Y" Then
miSaveSuccess = IIf(SaveRecord(), 1, 0) 'note SaveRecord is the
function that actually saves the changes to the database.
End If

Any help would be greatly appreciated.
Thanks in advance,
Jul 21 '05 #1
1 1307
I adding this after the submit and it fixed the problem:
start = timer : while timer-start < .2 : wend
I tried several other things but this was the only thing that seemed to work.
Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Martin Herrman | last post by:
Dear scripters, I wrote a PHP script that produces a form. If the form is submitted, the entered information is checked. If an error in the input...
by: LevaOpaki | last post by:
Why this work? <a href="#" onClick="Forma1.reset()">Link1</a> and this not? <a href="#" onClick="Forma1.submit()">Link1</a> I get error.
by: Sarah | last post by:
Hi all. I have a form, and several text and image links on it that should submit the form with different actions. I prepared a simple page...
by: arpita | last post by:
hi all... is there a way to call a backend application on the onclick event of a submit button?.... thank you....
by: Mic | last post by:
Goal: delay execution of form submit Code (Javascript + JScript ASP): <% Response.Write("<OBJECT ID='IntraLaunch' STYLE='display : none'...
by: Matt | last post by:
When the user click the submit button in myform.asp, then it will invoke the javascript to check the form data. I want to know if we need...
by: Margaret Werdermann | last post by:
Hi all: I'm having a nasty time with a particularly difficult piece of code and was hoping someone might be able to help me. I have a FormMail...
by: bill | last post by:
Is there any way to make a link (as marked by an <A>-tag, that is), behave exactly like a submit button? Many thanks! -bill
by: Deidre | last post by:
I am having a weird problem. I have an application thats default.aspx page is a menu page when a menu item is selected the requested page is...
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

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.