/    Sign up×
Community /Pin to ProfileBookmark

Hey All!!

I have this case statement. For this idea, is case the way to go?
I know the syntax is wrong. Can you please put me on the right track?

Thank you and have a great night

[code=php]
<?php
switch ($rightclick) {
case ‘0’:
break;
case ‘1’:
<SCRIPT language=”JavaScript”>
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function(“return false”)
</SCRIPT>
break;
?>
[/code]

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@SheldonMar 04.2006 — Thats right so far but...

[code=php]
<?php
switch ($rightclick) {
case '0':
//does nothing
break;
case '1':
?>
<SCRIPT language="JavaScript">
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")
</SCRIPT>

<?php
break;
default:
// is good to incluse the default
//does nothing
break;


} //closes the switch, dont forget it
?>[/code]



Instead of starting a newthread every time you thing of something why dont you try work something out for your self? Most of the 200 threads you have started, you could have solved in 5 minutes with a bit of thinking and research yourself.
Copy linkTweet thisAlerts:
@SpectreReturnsMar 04.2006 — the 200 threads you have started[/QUOTE]
Only one hundred and twenty four.

Shawn, you should really read through the basics of the PHP manual, they're quite helpful and have examples of [u]everything[/u].
Copy linkTweet thisAlerts:
@comptech520authorMar 04.2006 — Thats right so far but...

Instead of starting a newthread every time you thing of something why dont you try work something out for your self? Most of the 200 threads you have started, you could have solved in 5 minutes with a bit of thinking and research yourself.[/QUOTE]



Shawn, you should really read through the basics of the PHP manual, they're quite helpful and have examples of [u]everything[/u].[/QUOTE]


Hey guys!

I guess the best way to say this is I learn for the most part by doing and not reading which results in posts. This week I came out with an idea, and I wanted to try to do most of the work myself. So far off to a good start. I have been reading the PHP manual. For a manual it ROCKS! Your right, fun filled, action packed and full of info.

Half of my problem is if I know how to do it 1 way and I need to do the same thing, but in different format, I seek help because I just don't undertstand.

Any ideas on any PHP books? I heard O'Riley is great, but which one is a good starter?

Have a nice weekend ?

And by the way, thank you for your help


Shawn
Copy linkTweet thisAlerts:
@bokehMar 04.2006 — By the way, it is called a switch statement, not a case statement.
×

Success!

Help @comptech520 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.10,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...