|
Ok - have a good one for ya that I'm killing myself over.
I have xsl pages (obviously parsed as html) - regardless, I have a form where I need to run an animated gif or Flash (ex. swap image method from blank.gif to animated.gif) ON the same page when the form is submitted.
Problem #1 - you cannot run any script like this 'onSubmit' since the page is unloaded
So, I'm thinking (wondering) if this will work using an iFrame on this page? onSubmit/ Click, whatever - can I swap images in an embedded iFrame on this page from the main page? and how? OR am I between and rock & hardplace again - not capable of such functionality when the page is submitted?
Are there any other options to display this gif on the same page? New windows & frames/framesets not an option.
My boss INSISTS that this is what he wants, regardless of what I've told him a thousand times - won't take no for an answer!!! (and he codes!)
HELP?!!!
|
|
|
I have the same problem! Client who wants to click on an image thumbnail (on a moving slideshow in bottom of page) and have it appear above in the "main" section of the document. I can get the iframe sized and positioned right, even took care of the "scrolling" element, but no matter what I do, I can't get the target image to open in the iframe, ALWAYS opens in its own page. Client absolutely insists that all happen on SAME page...doesn't want to hear any other way to do it.
Please help!
Thanks!
P.S. Not using frames...tried that, no better result. Have "sliced the page, so have different sections that way, also tried using tables...no success there either.
|
|
|
Xanderrun, your problem sound quite a bit different from gem's original post. For your issue, perhaps my working code sample in this thread will give you some ideas for a solution. In it, I show a working demo of thumbnails on the left side that when clicked display the full size image on the right side of the page. No Frames or IFrames or absolute positioned elements.
http://www.codetoad.com/forum/15_23154.asp
gem, I developed an application once where I put a blank image at the top of a form. When the user would click to submit the form, I handled the click even in a javascript function that first swapped out the blank img with an animated "please wait..." image then submitted the form. The image would continue to be displayed on the old page until the browser started to load the new page. I didn't have to use any special windows or IFrames. Is this what you want to do?
I have also developed code where the form page pops up a small window indicating for the user to please wait then submits. The returned page has a script variable that is set to TRUE onload. The small popup checks for that variable once a second. When it finds it equal to TRUE, the small popup closes itself. Problem now days is that a lot of people are using popup blockers. There are a ton of very good and legitimate uses of popup windows. Unfortunately, the ad spammers have all but ruined their reputation.
|
|
|
|
|
Believe it or not - figured it out (could kill myself for how simple it is)
Troy - you were definitely on the same page w/ me - swapping out the image & running it while the page is being submitted . . .
SOLUTION:
Have a '/forum/blank.gif' sitting in a seperated table cell w/ an ID & name of 'waitFrame'
Then for my submit button, I have the following code:
<a href="javascript:formSubmit('Next');document.getElementById('waitFrame').src='images/calculating.gif';" >
This swaps out my image, playing my animated gif 'calculating' while submitting the form . . . works like a charm! Feel like such a doofus ;o)
[before I had a .js that set a timeout (having multiple scripts running on the submit would not submit & run the gif at the same time)- it would play the .gif then submit on timeout]
|
|
|
|
|
|
|
|