•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 456,234 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,762 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1293 | Replies: 3 | Solved
![]() |
•
•
Join Date: Mar 2007
Location: Brisbane, Australia
Posts: 215
Reputation:
Rep Power: 2
Solved Threads: 13
Have you tried:
window.location = "???.html";
Though that works, it's an incorrect way of doing things.
The
And come to think of it, there is no need to drag javascript into this. You can do this with simple HTML assuming you don't need to dynamically generate the link.
The
location property of the global object window is an object and not a string. What you need to do here is set the href attribute or property of the location object. And BTW, no need to prepend it with window since it is implied.location.href = 'http://www.google.com/';
And come to think of it, there is no need to drag javascript into this. You can do this with simple HTML assuming you don't need to dynamically generate the link.
<a href="http://www.google.com/"><input type="button" value="Go!!" /></a> I don't accept change. I don't deserve to live.
Happiness corrupts people.
Failing to value the lives of others cheapens your own.
Happiness corrupts people.
Failing to value the lives of others cheapens your own.
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Internet Explorer V6: This Page cannot be Displayed (Web Browsers)
- To Link a form to another (VB.NET)
- Display a movie clip on a button click (Graphics and Multimedia)
- Cannot find server: msg, HELP (Web Browsers)
- Internet explorer stopped working after using mozilla firefox (Windows NT / 2000 / XP / 2003)
- Verizon Dsl., Windows Xp..is It Normal (Windows NT / 2000 / XP / 2003)
- Any ideas on this., its a bit confusing.. (Windows NT / 2000 / XP / 2003)
- E2give and SaH left bugging me (Viruses, Spyware and other Nasties)
- My forum is not growing -- and I'm tired and drained literally (Website Reviews)
- "The page cannot be displayed" Error (Web Browsers)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Style is Null or not an Object
- Next Thread: Submitting data before auto-refresh



Linear Mode