Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #14187 > unrolled thread
| Started by | micky <NONONOmisc07@bigfoot.com> |
|---|---|
| First post | 2012-05-28 18:01 -0400 |
| Last post | 2012-06-23 15:26 -0400 |
| Articles | 12 — 6 participants |
Back to article view | Back to comp.lang.javascript
Newbie, want onclick to work, using Verizon sitebuilder micky <NONONOmisc07@bigfoot.com> - 2012-05-28 18:01 -0400
Re: Newbie, want onclick to work, using Verizon sitebuilder Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-05-29 00:25 +0200
Re: Newbie, want onclick to work, using Verizon sitebuilder Jeff North <jnorthau@yahoo.com.au> - 2012-05-29 12:13 +1000
Re: Newbie, want onclick to work, using Verizon sitebuilder Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-05-29 13:51 +0200
Re: Newbie, want onclick to work, using Verizon sitebuilder Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-05-29 14:06 +0200
Re: Newbie, want onclick to work, using Verizon sitebuilder Gene Wirchenko <genew@ocis.net> - 2012-05-28 21:32 -0700
Re: Newbie, want onclick to work, using Verizon sitebuilder micky <NONONOmisc07@bigfoot.com> - 2012-05-29 13:55 -0400
Re: Newbie, want onclick to work, using Verizon sitebuilder Gene Wirchenko <genew@ocis.net> - 2012-05-29 11:26 -0700
Re: Newbie, want onclick to work, using Verizon sitebuilder micky <NONONOmisc07@bigfoot.com> - 2012-06-23 14:03 -0400
Re: Newbie, want onclick to work, using Verizon sitebuilder Dr J R Stockton <reply1222@merlyn.demon.co.uk.not.invalid> - 2012-05-29 23:49 +0100
Re: Newbie, want onclick to work, using Verizon sitebuilder SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-05-30 15:13 +0200
Re: Newbie, want onclick to work, using Verizon sitebuilder micky <NONONOmisc07@bigfoot.com> - 2012-06-23 15:26 -0400
| From | micky <NONONOmisc07@bigfoot.com> |
|---|---|
| Date | 2012-05-28 18:01 -0400 |
| Subject | Newbie, want onclick to work, using Verizon sitebuilder |
| Message-ID | <7fr7s7p34k5b7oc8hi82ncafhtng4tobo1@4ax.com> |
Newbie, working on first page. I appreciate any help you can give me. Parts of this are going well but with Verizon I'm forced to use sitebuilder by Trellix. I'm not ready yet to pay to use another wehosting site, because I only have a few weeks to work on this, but then I won't be able to for a year or two. 1) What is wrong with this: <INPUT value="Favorite Page" type=button onclick="<A href="https://www.myfavoritesite.com"> </A> > When I put my cursor on the button, it gets outlined in orange and when I click the buttom gives the imagie of going down, but it doesn't call another page, or do anything else. I'm confused by the <A and /A and the > and matching up things, but when I had code something like this, but different,it made all the plain text which followed turn blue and be underlined, and when I clicked on the blue text, it went to the page I wanted!!! According to some webpage, there is another format for Button iiuc, as in:. <button type="button" onclick="displayDate()">Display Date</button> Should I be using that instead, when I want to call an external link? 2) Sometimes I update the HTML and save the file and nothing has changed. I have to click on "Edit Text" again, make a little change, undo the change, click "Done" again, and then it's changed. Is this my imagination??? 3) Tried to comment one line out with // . Didn't work. But. <!-- --> did work. Is that possible? or maybe the code didn't get saved the first time? 4) Does every page have to have a google search box? It showed up without my doing anything. Or at least, is there a way to force it to the bottom of the page? It started out at the bottom of the page and then I guess I made some small change in the html and it moved to the top. I've tried to undo whatever change I made, but the search box stays at the top, the first thing people will see. Thanks a lot.
[toc] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2012-05-29 00:25 +0200 |
| Message-ID | <5955839.WnbBsH7B45@PointedEars.de> |
| In reply to | #14187 |
micky wrote: > Newbie, working on first page. I appreciate any help you can give me. […] "A mailbox *receives* mail", micky #1701. <http://www.catb.org/~esr/faqs/smart-questions.html> > Thanks a lot. You're welcome. PointedEars -- Danny Goodman's books are out of date and teach practices that are positively harmful for cross-browser scripting. -- Richard Cornford, cljs, <cife6q$253$1$8300dec7@news.demon.co.uk> (2004)
[toc] | [prev] | [next] | [standalone]
| From | Jeff North <jnorthau@yahoo.com.au> |
|---|---|
| Date | 2012-05-29 12:13 +1000 |
| Message-ID | <01c8s75sghli0aiofi8uabcun9k7n23nlj@4ax.com> |
| In reply to | #14187 |
On Mon, 28 May 2012 18:01:09 -0400, in comp.lang.javascript micky <NONONOmisc07@bigfoot.com> <7fr7s7p34k5b7oc8hi82ncafhtng4tobo1@4ax.com> wrote: >| Newbie, working on first page. I appreciate any help you can give me. >| >| Parts of this are going well but with Verizon I'm forced to use >| sitebuilder by Trellix. I'm not ready yet to pay to use another >| wehosting site, because I only have a few weeks to work on this, but >| then I won't be able to for a year or two. >| >| 1) What is wrong with this: >| <INPUT value="Favorite Page" type=button >| onclick="<A href="https://www.myfavoritesite.com"> </A> > Note the quotes in the above line. You are missing the closing quote for the onclick statement. You will need to rework this line to: onclick="<A href='https://www.myfavoritesite.com'> </A>" > or if you want double quotes throughout the line you will need: onclick="<A href=\"https://www.myfavoritesite.com\"> </A>" > [snip 2 end]
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2012-05-29 13:51 +0200 |
| Message-ID | <3596002.OIYgp5SubR@PointedEars.de> |
| In reply to | #14190 |
Jeff North wrote: > micky wrote: >>| Newbie, working on first page. I appreciate any help you can give me. >>| >>| Parts of this are going well but with Verizon I'm forced to use >>| sitebuilder by Trellix. I'm not ready yet to pay to use another >>| wehosting site, because I only have a few weeks to work on this, but >>| then I won't be able to for a year or two. >>| >>| 1) What is wrong with this: >>| <INPUT value="Favorite Page" type=button >>| onclick="<A href="https://www.myfavoritesite.com"> </A> > > > Note the quotes in the above line. You are missing the closing quote > for the onclick statement. `onclick' is an *attribute* here, _not_ a statement. HTML is _not_ a programming language, it is a *markup* language. > You will need to rework this line to: > onclick="<A href='https://www.myfavoritesite.com'> </A>" > > or if you want double quotes throughout the line you will need: > onclick="<A href=\"https://www.myfavoritesite.com\"> </A>" > Utter nonsense. The value of the `onclick' attribute must be program code, without further specification, a syntactically correct ECMAScript /Program/. It MUST NOT contain an unescaped `<' character for that is a an STAGO (star tag open) delimiter. ECMAScript escape sequences *cannot* be used to escape markup delimiters as the markup parser will still see them. (And the value of the `onclick' property must be `null' or a reference to a Function instance. The above is neither.) Please get a minimum clue before you try to help. Nobody is helped by people posting their smattering here; free time of regulars is wasted with otherwise unnecessary corrections. You are not required to reply, you know. PointedEars -- Anyone who slaps a 'this page is best viewed with Browser X' label on a Web page appears to be yearning for the bad old days, before the Web, when you had very little chance of reading a document written on another computer, another word processor, or another network. -- Tim Berners-Lee
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2012-05-29 14:06 +0200 |
| Message-ID | <2739298.Xl3DxExJP4@PointedEars.de> |
| In reply to | #14196 |
Thomas 'PointedEars' Lahn wrote:
> Jeff North wrote:
>> You will need to rework this line to:
>> onclick="<A href='https://www.myfavoritesite.com'> </A>" >
>> or if you want double quotes throughout the line you will need:
>> onclick="<A href=\"https://www.myfavoritesite.com\"> </A>" >
>
> Utter nonsense. The value of the `onclick' attribute must be program
> code, without further specification, a syntactically correct ECMAScript
> /Program/. It MUST NOT contain an unescaped `<' character for that is a an
> STAGO (star tag open) delimiter. ECMAScript escape sequences *cannot* be
^t
> used to escape markup delimiters as the markup parser will still see them.
Clarification: ECMAScript escape sequences cannot be used to escape markup
delimiters *if* the escape sequence *still* contains the markup delimiters.
In this case, markup escape sequences –
onclick="<A href="https://www.myfavoritesite.com"> </A>"
– or ECMAScript escape sequences –
onclick="\x3cA href=\x22https://www.myfavoritesite.com\x22> \x3c/A>"
– could be used to make this Valid *markup*, but the attribute value would
still not be the required syntactically valid ECMAScript program, as
<A href="https://www.myfavoritesite.com"> </A>
is _not_ one (`<' is an operator, the operand left-hand side is missing, to
begin with).
PointedEars
--
When all you know is jQuery, every problem looks $(olvable).
[toc] | [prev] | [next] | [standalone]
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Date | 2012-05-28 21:32 -0700 |
| Message-ID | <gci8s7hkofg28vcbvflt6042a9rmqqillp@4ax.com> |
| In reply to | #14187 |
On Mon, 28 May 2012 18:01:09 -0400, micky <NONONOmisc07@bigfoot.com>
wrote:
>Newbie, working on first page. I appreciate any help you can give me.
First of all, HTML and JavaScript are two different languages,
and you have them somewhat confused. Details later.
>Parts of this are going well but with Verizon I'm forced to use
>sitebuilder by Trellix. I'm not ready yet to pay to use another
>wehosting site, because I only have a few weeks to work on this, but
>then I won't be able to for a year or two.
>
>1) What is wrong with this:
><INPUT value="Favorite Page" type=button
> onclick="<A href="https://www.myfavoritesite.com"> </A> >
The onclick code is supposed to be JavaScript, not HTML. You
also messed up on your quoting; as you wrote it, the onclick code is
<A href=
Try
<INPUT value="Favorite Page" type=button
onclick='location.href="https://www.myfavoritesite.com"'>
Note the two levels of quoting and that they are different quotes.
But why are you doing this? Why not just an anchor? As in:
<p>If you share my sense of humour, you might like <a
href="http://www.dilbert.com">Dilbert</a> or
href="http://www.xkcd.com">xkcd</a>.
>When I put my cursor on the button, it gets outlined in orange and
>when I click the buttom gives the imagie of going down, but it doesn't
>call another page, or do anything else. I'm confused by the <A
>and /A and the > and matching up things, but when I had code something
>like this, but different,it made all the plain text which followed
>turn blue and be underlined, and when I clicked on the blue text, it
>went to the page I wanted!!!
Without seeing it, who can say?
>According to some webpage, there is another format for Button iiuc, as
>in:.
> <button type="button" onclick="displayDate()">Display Date</button>
>Should I be using that instead, when I want to call an external link?
No, just correct your errors as noted above.
>2) Sometimes I update the HTML and save the file and nothing has
>changed. I have to click on "Edit Text" again, make a little change,
>undo the change, click "Done" again, and then it's changed. Is this
>my imagination???
A bug in your editor is possible, but more likely, you do not
know how to use it quite right. Are you sure that you are saving to
the correct place?
If you save elsewhere and then look at where you think you saved
to, you will have this problem. In particular, if your editor has a
default directory that it likes to save to and you do not normally
save there, forgetting to set the directory can do this.
>3) Tried to comment one line out with // . Didn't work.
>But. <!-- --> did work. Is that possible? or maybe the code
>didn't get saved the first time?
What are you trying to comment?
"<!--" and "-->" are the HTML comment delimiters.
"//" is a JavaScript line comment.
"/*" and "*/" are the JavaScript multiline comment delimiters.
Pick the right comment type for the language you wish to comment
in. Example:
***** Start of Sample Code *****
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Gene's Comment Example</title>
</head>
<body>
<!-- Maybe this will help. This is an HTML comment. -->
<h1>Big Title</h1>
<script type="text/javascript">
/* Now that we are in a JavaScript code section, a comment is like
this */
for (var i=10; i>0; i--) // or like this. Countdown from 10 is
traditional.
document.write(i+" ");
document.write("BOOM!");
</script>
</body>
</html>
***** End of Sample Code *****
>4) Does every page have to have a google search box? It showed up
>without my doing anything. Or at least, is there a way to force it
>to the bottom of the page? It started out at the bottom of the page
>and then I guess I made some small change in the html and it moved to
>the top. I've tried to undo whatever change I made, but the search
>box stays at the top, the first thing people will see.
No, at least in general. I can not say for your particular ISP.
>Thanks a lot.
You are welcome. I hope this helps.
Sincerely,
Gene Wirchenko
[toc] | [prev] | [next] | [standalone]
| From | micky <NONONOmisc07@bigfoot.com> |
|---|---|
| Date | 2012-05-29 13:55 -0400 |
| Message-ID | <b92as7tcaj71000epsqptl7q7vfsj8tac0@4ax.com> |
| In reply to | #14192 |
On Mon, 28 May 2012 21:32:33 -0700, Gene Wirchenko <genew@ocis.net> wrote: A great answer, Gene. I appreciate it. It will take me some time to reply to the rest of it, but I wanted to explain 4 a little better. > >>4) Does every page have to have a google search box? It showed up >>without my doing anything. Or at least, is there a way to force it >>to the bottom of the page? It started out at the bottom of the page >>and then I guess I made some small change in the html and it moved to >>the top. I've tried to undo whatever change I made, but the search >>box stays at the top, the first thing people will see. > > No, at least in general. I can not say for your particular ISP. Yeah, of course not, unless you've dealt with Verizon. Verizon has long advertised free webspace with every internet account. Last October, I think it was, Verizon said there were security risks in using FTP to upload webpage code (or even data?) , because it could be intercepted by hackers and one's passwords etc. could be stolen. So they stopped letting people write their own HTML etc. from start to finish, and installed this sitebuilder by Trellix. They didn't explain why if one paid 6 dollars a month, he could still use FTP. And they raised some people's rates. Their sitebuilder only lets one fully(?**) fiddle with the Body of the screen, and users get only slight input on the header, the link bar, or the footer. **I can type in anything I want, but that doesn't mean some of it won't be changed or erased when I save it. So it wouldn't surpise me if google is paying them to include a google search box in every template. There are 300 templates, but really only 3 or 4. I've only tried two. You can't see the google search box before choosing the template. They seemed to put the box at the top in the first template, and at the bottom in the second (where it wasn't very annoying), but then I made some little change and it went to the top again. I've read lots of webposts by people Everyone who posts hates or dislikes it. It still lists AltaVista, Lycos, Alltheweb (which now redirects to Yahoo), and Google and no other search engine in a screen called Search Engine Submission Site Add-on. Apparently it was written in 2003, other posters say, when those other three were big. >>Thanks a lot. > > You are welcome. I hope this helps.
[toc] | [prev] | [next] | [standalone]
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Date | 2012-05-29 11:26 -0700 |
| Message-ID | <lv4as79h7lqoiibpvru7vilv0p3188tj6f@4ax.com> |
| In reply to | #14216 |
On Tue, 29 May 2012 13:55:41 -0400, micky <NONONOmisc07@bigfoot.com>
wrote:
>On Mon, 28 May 2012 21:32:33 -0700, Gene Wirchenko <genew@ocis.net>
>wrote:
>
>A great answer, Gene. I appreciate it. It will take me some time to
>reply to the rest of it, but I wanted to explain 4 a little better.
You are welcome.
>>>4) Does every page have to have a google search box? It showed up
>>>without my doing anything. Or at least, is there a way to force it
>>>to the bottom of the page? It started out at the bottom of the page
>>>and then I guess I made some small change in the html and it moved to
>>>the top. I've tried to undo whatever change I made, but the search
>>>box stays at the top, the first thing people will see.
>>
>> No, at least in general. I can not say for your particular ISP.
>
>Yeah, of course not, unless you've dealt with Verizon.
[snipped nasty details]
The phrase "You poor bastard!" comes to mind.
I seriously suggest that you switch. If you finally do get it
working, then you will only have a solution for that environment. Who
knows what bad habits/practices you might get into to kludge something
that works?
I have actually not used JavaScript in the wild so I have no recs
for who to deal with. Perhaps another denizen can help you there.
[snip]
Sincerely,
Gene Wirchenko
[toc] | [prev] | [next] | [standalone]
| From | micky <NONONOmisc07@bigfoot.com> |
|---|---|
| Date | 2012-06-23 14:03 -0400 |
| Message-ID | <m31cu7tu4dbdnsgb0qh8154k8eoq7sdguh@4ax.com> |
| In reply to | #14217 |
On Tue, 29 May 2012 11:26:11 -0700, Gene Wirchenko <genew@ocis.net> wrote: >On Tue, 29 May 2012 13:55:41 -0400, micky <NONONOmisc07@bigfoot.com> >wrote: > >>On Mon, 28 May 2012 21:32:33 -0700, Gene Wirchenko <genew@ocis.net> >>wrote: >> >>A great answer, Gene. I appreciate it. It will take me some time to >>reply to the rest of it, but I wanted to explain 4 a little better. > > You are welcome. > >>>>4) Does every page have to have a google search box? It showed up >>>>without my doing anything. Or at least, is there a way to force it >>>>to the bottom of the page? It started out at the bottom of the page >>>>and then I guess I made some small change in the html and it moved to >>>>the top. I've tried to undo whatever change I made, but the search >>>>box stays at the top, the first thing people will see. >>> >>> No, at least in general. I can not say for your particular ISP. >> >>Yeah, of course not, unless you've dealt with Verizon. > >[snipped nasty details] > > The phrase "You poor bastard!" comes to mind. > > I seriously suggest that you switch. If you finally do get it >working, then you will only have a solution for that environment. Who >knows what bad habits/practices you might get into to kludge something >that works? I see your points. I took your advice and gave up on Verizon. > > I have actually not used JavaScript in the wild so I have no recs >for who to deal with. Perhaps another denizen can help you there. OK. >[snip] > >Sincerely, > >Gene Wirchenko
[toc] | [prev] | [next] | [standalone]
| From | Dr J R Stockton <reply1222@merlyn.demon.co.uk.not.invalid> |
|---|---|
| Date | 2012-05-29 23:49 +0100 |
| Message-ID | <GwfuFdeCKVxPFwdk@invalid.uk.co.demon.merlyn.invalid> |
| In reply to | #14187 |
In comp.lang.javascript message <7fr7s7p34k5b7oc8hi82ncafhtng4tobo1@4ax. com>, Mon, 28 May 2012 18:01:09, micky <NONONOmisc07@bigfoot.com> posted: >Newbie, working on first page. I appreciate any help you can give me. > >Parts of this are going well but with Verizon I'm forced to use >sitebuilder by Trellix. I'm not ready yet to pay to use another >wehosting site, because I only have a few weeks to work on this, but >then I won't be able to for a year or two. That's not good. >1) What is wrong with this: ><INPUT value="Favorite Page" type=button > onclick="<A href="https://www.myfavoritesite.com"> </A> > First, you need to understand the difference between HTML & JavaScript. Get some books from your local library or used book shops. >2) Sometimes I update the HTML and save the file and nothing has >changed. I have to click on "Edit Text" again, make a little change, >undo the change, click "Done" again, and then it's changed. Is this >my imagination??? Probably. >3) Tried to comment one line out with // . Didn't work. >But. <!-- --> did work. Is that possible? or maybe the code >didn't get saved the first time? As for (1). >4) Does every page have to have a google search box? No; but it might on Verizon. Note : Pointy thinks he is a human being. Others may be unconvinced. Note : please read the newsgroup FAQ. -- (c) John Stockton, nr London UK ?@merlyn.demon.co.uk IE8 FF8 Op11 Sf5 Cr15 news:comp.lang.javascript FAQ <http://www.jibbering.com/faq/index.html>. <http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources. <http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
[toc] | [prev] | [next] | [standalone]
| From | SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> |
|---|---|
| Date | 2012-05-30 15:13 +0200 |
| Message-ID | <4fc61d05$0$12484$ba4acef3@reader.news.orange.fr> |
| In reply to | #14187 |
Le 29/05/12 00:01, micky a écrit : > Newbie, working on first page. I appreciate any help you can give me. > > 1) What is wrong with this: > <INPUT value="Favorite Page" type=button > onclick="<A href="https://www.myfavoritesite.com"> </A> > <INPUT value="Favorite Page" type=button onclick="location='https://www.myfavoritesite.com';"> or : <button onclick="location='https://www.myfavoritesite.com';"> Favorite Page </button> -- Stéphane Moriaux avec/with iMac-intel
[toc] | [prev] | [next] | [standalone]
| From | micky <NONONOmisc07@bigfoot.com> |
|---|---|
| Date | 2012-06-23 15:26 -0400 |
| Message-ID | <du5cu75g6kesjtv003i00kdv0nsfqo6bj5@4ax.com> |
| In reply to | #14234 |
On Wed, 30 May 2012 15:13:40 +0200, SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> wrote: >Le 29/05/12 00:01, micky a écrit : >> Newbie, working on first page. I appreciate any help you can give me. >> >> 1) What is wrong with this: >> <INPUT value="Favorite Page" type=button >> onclick="<A href="https://www.myfavoritesite.com"> </A> > > ><INPUT value="Favorite Page" type=button > onclick="location='https://www.myfavoritesite.com';"> Thanks, SAM. this worked just fine. Now I've added a new twist. I want part of the URL to be a varialble, SearchValue, that is set earlier. Currently the line is: <input type="button" value="Search" onclick="location='http://www.google.com/search?&q=SearchValue';" > And it goes to the google page and serarches for SearchValue instead of the contents of the variable. I removed the single quotes, and then it didnt' leave the page it was on. (didnt' go to the google search page) . I put back the single quotes and removed the double quotes, and it worked the same as with the double quotes, that is, it went to the google page and searched for SearchValue instead of the contents of SearchValue. . FTR I removed both sets of quotes and it "worked" like it did without single quotes but with double quotes. So I'm stuck. >or : > ></button>><button onclick="location='https://www.myfavoritesite.com';"> >Favorite Page ></button> This had the same problem.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web