Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Dead simple javascript form
Old 01-23-2009, 10:07 AM Dead simple javascript form
Average Talker

Posts: 17
Trades: 0
Hi
Being a total newbie can someone explain how to fo this

I have a form

PHP Code:
<form name="coupon" target="_blank" action="http://www.mydomain.com/shop/index.php" method="post"><input name="coupon_code" type="text" style="width:20%;margin:1px;text-align:left;">
 
  <
br><input type="image" src="http://www.mydomain.com.co.uk/shop/includes/languages/english/images/buttons/button_continue.gif" border="0" alt="Continue" title=" Continue " >
</
form

now all I want to do is get this to open in a new window (it does already) but I want the pop up window to automatically close after 10 seconds

I also want the pop up box to say - this window will automatically close at the top

can this be done - how do i add it to my form

thank YOU
ronnieb is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-23-2009, 03:23 PM Re: Dead simple javascript form
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
can this be done - how do i add it to my form
Yes and you don't add it to the form it will need to be done in the new page that opens.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-23-2009, 04:47 PM Re: Dead simple javascript form
Average Talker

Posts: 17
Trades: 0
how ??
ronnieb is offline
Reply With Quote
View Public Profile
 
Old 01-23-2009, 05:53 PM Re: Dead simple javascript form
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Add a timer to fire self.close

BUT it will trigger whenever the page opens NOT just when called from the form. So you may need to rethink the strategy.

What exactly are you trying to accomplish?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-23-2009, 07:13 PM Re: Dead simple javascript form
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
you could open the page with a query ?timer=1000, then check for the query with the window.location.search property, and close it according to this data. If no timer data, no window close.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 01-26-2009, 03:19 PM Re: Dead simple javascript form
Average Talker

Posts: 17
Trades: 0
well basically i want a customer to put a discount coupon in on a webpage, which connects directly to my oscommerce shop, and shows that the coupon has been redeemed

then the customer goes back to the shop from a different link from the original webpage, and adds a certain product to the basket.

the original form works great, but i want the oscommerce page to close after say 5 seconds, so the customer puts in a coupon, the oscommerce site says redeemed, then automatically closes the page, so when the customer puts the product in their basket, there is only 1 page open still not 2

i hope that makes sense, its a bit hard to explain
ronnieb is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Dead simple javascript form
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.16918 seconds with 12 queries