473,387 Members | 3,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

newb question- js/html button

i've never used a root link like this with a button, so perhaps this is
why i've never encountered a problem.. but how would one fix this:

<input name="Go to this webpage" type="button" value="Go to this
webpage" onClick="/directory1/webpage.htm"/>

i tried onClick="javascript:window.open(/directory1/webpage.htm);"

but that doesn't work either :(

any help is much appreciated!

Oct 20 '06 #1
3 1301
nevermind!

it's friday, and it seems my brain is fried from a week of stressful
work.. i missed the obvious

<input name="Go to this webpage" type="button" value="Go to this
webpage" onClick="javascript:window.open('/directory1/webpage.htm')"/>

single quotes around the address...
nektir wrote:
i've never used a root link like this with a button, so perhaps this is
why i've never encountered a problem.. but how would one fix this:

<input name="Go to this webpage" type="button" value="Go to this
webpage" onClick="/directory1/webpage.htm"/>

i tried onClick="javascript:window.open(/directory1/webpage.htm);"

but that doesn't work either :(

any help is much appreciated!
Oct 20 '06 #2
nektir wrote:
i've never used a root link like this with a button, so perhaps this is
why i've never encountered a problem.. but how would one fix this:

<input name="Go to this webpage" type="button" value="Go to this
webpage" onClick="/directory1/webpage.htm"/>

i tried onClick="javascript:window.open(/directory1/webpage.htm);"

but that doesn't work either :(

any help is much appreciated!
<input name="Go to this webpage" type="button" value="Go to this
webpage" onclick="location='/directory1/webpage.htm'"/>

You may want to not use spaces in form control name.

<input name="Go_to_this_ webpage" ...

Mick

Oct 20 '06 #3
nektir wrote:
nevermind!

it's friday, and it seems my brain is fried from a week of stressful
work.. i missed the obvious

<input name="Go to this webpage" type="button" value="Go to this
webpage" onClick="javascript:window.open('/directory1/webpage.htm')"/>

single quotes around the address...
nektir wrote:
>i've never used a root link like this with a button, so perhaps this is
why i've never encountered a problem.. but how would one fix this:

<input name="Go to this webpage" type="button" value="Go to this
webpage" onClick="/directory1/webpage.htm"/>

i tried onClick="javascript:window.open(/directory1/webpage.htm);"

but that doesn't work either :(

any help is much appreciated!
Why do you begin the code in the onclick definition with the string "javascript:"???????????

Why do you not pass the URL parameter to window.open() as a string? I don't know *what* that will do - pass a RegExp?

Why are you bothering?
Oct 21 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: knoak | last post by:
Hi there, I have a small question: I have a table with lots of rows in it. Of course all have a different id, but each can be assigned to a certain category. Categories correspond with 1 - 10....
0
by: claudel | last post by:
Hi I have a newb PHP/Javascript question regarding checkbox processing I'm not sure which area it falls into so I crossposted to comp.lang.php and comp.lang.javascript. I'm trying to...
4
by: Hari | last post by:
Basically I would like to downlod the visual basic 6.0 compiler, but i already have the vb.net compiler. I had to pay for the VB.net IDE, just wondering if I can get the vb 6.0 IDE for free or not....
0
by: David E. | last post by:
So as a programmer, what's the best thing to study? EJB? How much of the J2EE or Enterprise architecture is necessary to no? I guess I need a good overview for a newb like me... thanks.. --...
5
by: Alexandre | last post by:
Hi, Im a newb to dev and python... my first sefl assigned mission was to read a pickled file containing a list with DB like data and convert this to MySQL... So i wrote my first module which...
3
by: claudel | last post by:
Hi I have a newb PHP/Javascript question regarding checkbox processing I'm not sure which area it falls into so I crossposted to comp.lang.php and comp.lang.javascript. I'm trying to...
6
by: Sean Berry | last post by:
Hello all I have build a list that contains data in the form below -- simplified for question -- myList = ,, ...] I have a function which takes value3 from the lists above and returns...
5
by: none | last post by:
hi all, (i am running on win 2k pro). i saw a program i like on a website and when i went to download it it was just a load of 'c' code. now, i know very little about 'c' or programming but...
2
by: J | last post by:
Greetings Group- I'm trying to put together a pattern matching script that scans a directory tree for tif images contained in similar folder names, but running into a NewB problem already. Is it...
3
by: DaveJ | last post by:
Hi everyone, I really was hesitant to post here for fear of seeming foolish but I really am desparate, and do appreciate any opportunity to get answers from real people. So please forgive the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.