469,903 Members | 1,496 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

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 1252
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Martin Herrman | last post: by
5 posts views Thread by LevaOpaki | last post: by
3 posts views Thread by arpita | last post: by
29 posts views Thread by Mic | last post: by
3 posts views Thread by Matt | last post: by
2 posts views Thread by Margaret Werdermann | last post: by
7 posts views Thread by bill | last post: by
1 post views Thread by Deidre | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.