Current location: Hot Scripts Forums » General Web Coding » JavaScript » script to redirect message box to URL


script to redirect message box to URL

Reply
  #11 (permalink)  
Old 10-20-08, 10:11 AM
remy_ remy_ is offline
Newbie Coder
 
Join Date: Oct 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Nico,

thanks again for your kind help

however, i don't know why it's still not working as intended when i tried.

i change nothing..100% copy and paste as written by u.

when i put that code in one of my pages, the word 'click me' become as a link (when i preview in browser)..and when i click on that lick, no popup (message box) come out.

FYI, i use XSitePro as a website builder.

i've never try with Microsoft Frontpage.

Is it possible because of that software?

Or do i need to upload that page to the hosting server first (instead of preview with browser but still in my hard disk)?

Thanks again for advice.
Reply With Quote
  #12 (permalink)  
Old 10-20-08, 10:31 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
I've never used (or heard of) XSitePro. The editor usually shouldn't make a difference, though. But if however the software changes things in your code, it's time to find a new one.

A lot of people hate Frontpage (I've never used it), but after everything I've heard I wouldn't even bother trying it.

Take a look at this thread for some suggestions:
http://www.programmingtalk.com/showthread.php?t=47991

And there's no problem with previewing the script on your computer. Maybe try creating a blank page in notepad, and copy and paste the code in there, then save it as "something.html" and open it in your web browser. If that doesn't work either, chances are that you haven't enabled Javascript on your browser?
Reply With Quote
  #13 (permalink)  
Old 10-20-08, 10:52 AM
remy_ remy_ is offline
Newbie Coder
 
Join Date: Oct 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Nico,

i'm happy now.

it works when i did using notepad u u mentioned.

at least i know, your script is as per my intention.

i'll figure out why it still doesn't work with my website editor.

anyway...thanks alot.

u help me so much.

5 STARS for u Nico!
Reply With Quote
  #14 (permalink)  
Old 10-20-08, 11:07 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
Glad I could help.

And yeah, try using a different editor. I can highly suggest Dreamweaver.
Reply With Quote
  #15 (permalink)  
Old 10-21-08, 09:43 AM
remy_ remy_ is offline
Newbie Coder
 
Join Date: Oct 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Dear Nico,

yeahhh..it works with Frontpage too ..at least no need for me to move to Dreamweaver..

can the popup just only show the 'OK' button...no 'cancel' button?

if can, what is the script for that?

thanks again
Reply With Quote
  #16 (permalink)  
Old 10-21-08, 09:53 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
Try this:
javascript Code:
  1. <script type="text/javascript">
  2. <!--
  3. function popup()
  4. {
  5.     alert('Thank you!');
  6.     window.location = 'http://www.abc.com';
  7.  
  8.     return false;
  9. }
  10. //-->
  11. </script>
  12.  
  13. <a href="#" onclick="return popup();">Click me</a>
Reply With Quote
  #17 (permalink)  
Old 10-21-08, 10:35 AM
remy_ remy_ is offline
Newbie Coder
 
Join Date: Oct 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up

Nico,

as expected, it works!

thanks so much for kind help and quick response.
Reply With Quote
  #18 (permalink)  
Old 10-21-08, 10:38 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
You're welcome.

If you have more questions, keep asking!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Run Your Own Profitable and VERY unique eBusiness Voltaire General Advertisements 3 03-30-10 06:36 AM
Lil php coding help for url shortning script pede69 PHP 2 04-03-08 05:04 AM
message box redirect page kiko08 JavaScript 1 01-18-07 02:27 AM
Is there any integrity of script rankings? webmaster@atmanager.com Hot Scripts Forum Questions, Suggestions and Feedback 17 08-06-04 12:12 AM


All times are GMT -5. The time now is 11:44 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.