Browser popup Alert Grey box… Where do I enter the code given by W3Schools on the page inspector? Ty
Posted: 27th January 2010 12:50 AM

Hello

I got the bellow code from: http://www.w3schools.com/JS/tryit.asp?filename=tryjs_alert
If you click on the above link and the “show alert box” you’ll understand better what I mean. Ty

<html>
<head>

function show_alert()
{
alert("You have read, understood and accepted Terms and Conditions before entering the site");
}

</head>
<body>

<input type="button" onclick="show_alert()" value="Show alert box” />

</body>
</html>

This exactly the browser onclick popup grey box that I want on my website, also, I notice that RW uses the browser onclick popup box somewhere…

However, I do not know which tab do I enter this code in the page inspector???

Can you help me? Ty.

Kind regards

 Signature 

Are you such a dreamer? To put the world to rights?
I’ll stay home forever where 2+2=5

~ Radiohead ~

#1.  Posted: 27th January 2010 01:13 AM

The Following goes into Page Inspector>Header>Javascript

function show_alert()
{
alert
("You have read, understood and accepted Terms and Conditions before entering the site");
}

And this part goes wherever you want the button on the page.

<input type="button" onclick="show_alert()" value="Show alert box" />

Phil

 Signature 

Check out the Stacks for the Stacks Plugin.
Table Stacks, SideBoxes, Flash Stacks, Stacks Stacks, Image Stacks.........

#2.  Posted: 27th January 2010 01:46 AM
Phil Warrender - 27 January 2010 01:13 AM

The Following goes into Page Inspector>Header>Javascript

function show_alert()
{
alert
("You have read, understood and accepted Terms and Conditions before entering the site");
}



And this part goes wherever you want the button on the page.

<input type="button" onclick="show_alert()" value="Show alert box" />



Phil

Hello Phil

Not sure if I understood the second part:
And this part goes wherever you want the button on the page.

<input type="button" onclick="show_alert()" value="Show alert box" />

Does it mean that I enter this code on my homepage = index.html (styled text page)?
And instead of “button” should I enter “glassbutton.png”????… because it is where one clicks to enter the site.

Ty

Image Attachments

glassbutton.png
Click thumbnail to see full-size image
 Signature 

Are you such a dreamer? To put the world to rights?
I’ll stay home forever where 2+2=5

~ Radiohead ~

#3.  Posted: 27th January 2010 02:19 AM

OK - I have a little better idea of what you want.

The code you originally posted was for a browser generated button.
So instead of that, when you link the button.png, use the ‘custom attributes’ pane in the link window to enter the ‘onClick’ and ‘value’ attributes.

This is how it should look. You will need to export the site to see it work.

ZZ0558E4AB.jpg

Best,
Phil

 Signature 

Check out the Stacks for the Stacks Plugin.
Table Stacks, SideBoxes, Flash Stacks, Stacks Stacks, Image Stacks.........

#4.  Posted: 27th January 2010 02:19 AM
JKLstar - 27 January 2010 01:46 AM
Phil Warrender - 27 January 2010 01:13 AM

The Following goes into Page Inspector>Header>Javascript

function show_alert()
{
alert
("You have read, understood and accepted Terms and Conditions before entering the site");
}



And this part goes wherever you want the button on the page.

<input type="button" onclick="show_alert()" value="Show alert box" />



Phil

Hello Phil

Not sure if I understood the second part:
And this part goes wherever you want the button on the page.

<input type="button" onclick="show_alert()" value="Show alert box" />

Does it mean that I enter this code on my homepage = index.html (styled text page)?
And instead of “button” should I enter “glassbutton.png”????… because it is where one clicks to enter the site.

Ty

Hello

Okay, I’ve tried the above codes as follow:

Entered the first one as told on page inspector/head/javascript.

Entered the second code, both ways. Either way, when I go to preview it shows the code+when I click on either “button” or “glassbutton.png” it does not bring up the Browser Alert Grey Box???

Do I have to export and publish to eliminate the code from showing and get it to work, as one does with the Contact Form php?

Do I have to upload any file to Cpanel?

What am I doing wrong? ... Poxy seemed rather simple on W3Schools Sad

Ty

JKLstar

 Signature 

Are you such a dreamer? To put the world to rights?
I’ll stay home forever where 2+2=5

~ Radiohead ~

#5.  Posted: 27th January 2010 02:28 AM
JKLstar - 27 January 2010 02:19 AM

Entered the second code, both ways. Either way, when I go to preview it shows the code+when I click on either “button” or “glassbutton.png” it does not bring up the Browser Alert Grey Box???

Do I have to export and publish to eliminate the code from showing and get it to work, as one does with the Contact Form php?

Do I have to upload any file to Cpanel?

What am I doing wrong? ... Poxy seemed rather simple on W3Schools Sad

Ty

JKLstar

If you follow my directions above then this should be the result when you export the site to the desktop.

ZZ6B361D08.jpg

Phil

 Signature 

Check out the Stacks for the Stacks Plugin.
Table Stacks, SideBoxes, Flash Stacks, Stacks Stacks, Image Stacks.........

#6.  Posted: 27th January 2010 02:37 AM
JKLstar - 27 January 2010 02:19 AM
JKLstar - 27 January 2010 01:46 AM
Phil Warrender - 27 January 2010 01:13 AM

The Following goes into Page Inspector>Header>Javascript

function show_alert()
{
alert
("You have read, understood and accepted Terms and Conditions before entering the site");
}



And this part goes wherever you want the button on the page.

<input type="button" onclick="show_alert()" value="Show alert box" />



Phil

Hello Phil

Not sure if I understood the second part:
And this part goes wherever you want the button on the page.

<input type="button" onclick="show_alert()" value="Show alert box" />

Does it mean that I enter this code on my homepage = index.html (styled text page)?
And instead of “button” should I enter “glassbutton.png”????… because it is where one clicks to enter the site.

Ty

Hello

Okay, I’ve tried the above codes as follow:

Entered the first one as told on page inspector/head/javascript.

Entered the second code, both ways. Either way, when I go to preview it shows the code+when I click on either “button” or “glassbutton.png” it does not bring up the Browser Alert Grey Box???

Do I have to export and publish to eliminate the code from showing and get it to work, as one does with the Contact Form php?

Do I have to upload any file to Cpanel?

What am I doing wrong? ... Poxy seemed rather simple on W3Schools Sad

Ty

JKLstar

Hello Phil

Posted the above reply at the same time that you posted yours.

I’m using RW Version 3.6.7

I do understand what you mean now, but where can I add the values you gave me without the attributes box???  In my version it shows on the add link =
* URL
* Open in
* Title
* rel

I looked for attributes on media/page inspector but ...oh no… I don’t know what to do Sad

Ty

JKLstar

 Signature 

Are you such a dreamer? To put the world to rights?
I’ll stay home forever where 2+2=5

~ Radiohead ~

#7.  Posted: 27th January 2010 02:46 AM

If you follow my directions above then this should be the result when you export the site to the desktop.

ZZ6B361D08.jpg

Phil

Genius Phil

Oh! This is exactly what I am trying to achieve. Excellent:) ... Hope I can do that with my RW version .  Yikes
Ty Phil

Kind regards

 Signature 

Are you such a dreamer? To put the world to rights?
I’ll stay home forever where 2+2=5

~ Radiohead ~

#8.  Posted: 27th January 2010 02:52 AM
JKLstar - 27 January 2010 02:37 AM

I’m using RW Version 3.6.7

I do understand what you mean now, but where can I add the values you gave me without the attributes box???  In my version it shows on the add link =
* URL
* Open in
* Title
* rel

I looked for attributes on media/page inspector but ...oh no… I don’t know what to do Sad

Ty

JKLstar

Where there’s a will there’s a way Wink

You can sneak the code into the ‘rel’ field thusly

" onclick="show_alert()" value="Show alert box

ZZ4E095C30.jpg

Important note: a quote mark must precede onclick and there is no quote at the end.

Phil

 Signature 

Check out the Stacks for the Stacks Plugin.
Table Stacks, SideBoxes, Flash Stacks, Stacks Stacks, Image Stacks.........

#9.  Posted: 27th January 2010 02:58 AM
Phil Warrender - 27 January 2010 02:52 AM
JKLstar - 27 January 2010 02:37 AM

I’m using RW Version 3.6.7

I do understand what you mean now, but where can I add the values you gave me without the attributes box???  In my version it shows on the add link =
* URL
* Open in
* Title
* rel

I looked for attributes on media/page inspector but ...oh no… I don’t know what to do Sad

Ty

JKLstar

Where there’s a will there’s a way Wink

You can sneak the code into the ‘rel’ field thusly

" onclick="show_alert()" value="Show alert box

ZZ4E095C30.jpg

Important note: a quote mark must precede onclick and there is no quote at the end.

Phil

Ty Phil

Yesssss.... Where there’s a will there’s a way ;-)

Okay… Understood everything. Let me try to get this ball rolling.
I’ll let you know asap, but I am sure it will work.

Thank you sooooooooo much for your kindness and time.

Kind regards

JKLstar

 Signature 

Are you such a dreamer? To put the world to rights?
I’ll stay home forever where 2+2=5

~ Radiohead ~

#10.  Posted: 27th January 2010 04:12 AM
JKLstar - 27 January 2010 02:58 AM
Phil Warrender - 27 January 2010 02:52 AM
JKLstar - 27 January 2010 02:37 AM

I’m using RW Version 3.6.7

I do understand what you mean now, but where can I add the values you gave me without the attributes box???  In my version it shows on the add link =
* URL
* Open in
* Title
* rel

I looked for attributes on media/page inspector but ...oh no… I don’t know what to do Sad

Ty

JKLstar

Where there’s a will there’s a way Wink

You can sneak the code into the ‘rel’ field thusly

" onclick="show_alert()" value="Show alert box

ZZ4E095C30.jpg

Important note: a quote mark must precede onclick and there is no quote at the end.

Phil

Ty Phil

Yesssss.... Where there’s a will there’s a way ;-)

Okay… Understood everything. Let me try to get this ball rolling.
I’ll let you know asap, but I am sure it will work.

Thank you sooooooooo much for your kindness and time.

Kind regards

JKLstar

Hello Phil

Works fine, I exported the site and the link is set as it should = opening my homepage. But the browser grey box title shows “JavaScript Application”.

I have set URL and title, so I am wondering if it is happening only in export and once I publish the site hopefully it will disappear and either show my own URL or title, from either my website or from the browser instead of “JavaScript Application” as grey box title?

It is 3AM in London-UK and my mind in on delta zone.... Would be nice to have an answer before publishing the site. Gee… I must get some sleep and I’ll finish this project when I wake up.

Thank you for your kind help.

God bless

JKLstar

 Signature 

Are you such a dreamer? To put the world to rights?
I’ll stay home forever where 2+2=5

~ Radiohead ~