Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-30-2007, 06:09 PM   PM User | #1
memoir
New to the CF scene

 
Join Date: Jan 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
memoir is an unknown quantity at this point
Text field disappears when page reloads

Here's my page for reference:http://loudflower.com/p-29-true-colo...eebrwoman.aspx

The bottom half of the page has a blank shirt. You can upload a photo and it is resized and positioned using CSS. Then there is a text box. I have a simple script tied to the "Apply to Shirt" button that applies the text to another text box that is positioned over the shirt, again using CSS. The problem is that when clicking the button that says "Upload Photo/Update Price" the text over the shirt is no long there after the page reloads. I did try using the script to apply the text to the shirt when clicking the "Upload..." button and would see it briefly when clicking the button but again when the page reloads it's not there (though it has been captured for my purposes). I just don't want to confuse the user who might wonder if the text is really there at all.

fwiw - the site is build using a .net shopping cart system. Each product is essentially displayed with the help of an XML doc. I've used CSS to design the look of the site. If it helps I could attach the XML doc for this page.

I'm new to writing javascript and trying to learn but confused about this. Any tips/ideas for me would be appreciated.

Thanks
-Scott
memoir is offline   Reply With Quote
Old 01-31-2007, 07:37 AM   PM User | #2
Arty Effem
Banned

 
Join Date: May 2006
Location: England
Posts: 664
Thanks: 0
Thanked 84 Times in 84 Posts
Arty Effem can only hope to improve
Quote:
Originally Posted by memoir View Post
Here's my page for reference:http://loudflower.com/p-29-true-colo...eebrwoman.aspx

The bottom half of the page has a blank shirt. You can upload a photo and it is resized and positioned using CSS. Then there is a text box. I have a simple script tied to the "Apply to Shirt" button that applies the text to another text box that is positioned over the shirt, again using CSS. The problem is that when clicking the button that says "Upload Photo/Update Price" the text over the shirt is no long there after the page reloads.
Try inserting this code within any existing script tags.
Code:
window.onload=function()
{
document.forms.form1.shirtText.value=document.forms.form1.KitGroupID_18_TextOption_42.value
}
Such functionality is JS dependent and should have a server-side backup.
Arty Effem is offline   Reply With Quote
Old 01-31-2007, 08:44 AM   PM User | #3
memoir
New to the CF scene

 
Join Date: Jan 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
memoir is an unknown quantity at this point
Arty, thank you, thank you! A huge help and so simple. I was close in my prior attempts but missing the key ingredient - window onload function.

-Scott
memoir is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:50 PM.


Advertisement
Log in to turn off these ads.