UnitedForums - UK Web Hosting Forum UnitedHosting Community Hosting Forums
Network and Server StatusCustomer SupportUK Web Hosting
UnitedHostingUnitedHosting Sitemap UK Hosting ForumUK Web HostingWeb Hosting ForumsUK Reseller HostingWeb Host CommunityUK Managed Dedicated ServersHosting Help and SupportUK Domain Name Registration

Go Back   UnitedForums.co.uk > UnitedHosting Community > Website Development & Scripting

Reply
 
Thread Tools Rate Thread Display Modes
Old 16th February 2003, 06:26 PM   #1 (permalink)
dwilson
Registered User
 
Join Date: Nov 2002
Location: Kansas City MO
Posts: 549
Send a message via ICQ to dwilson Send a message via AIM to dwilson Send a message via Yahoo to dwilson
PHP and javascript

Can you not use mouseover code in PHP files? Mine is not working.
__________________
Derik Wilson
dwilson is offline   Reply With Quote
Old 16th February 2003, 06:48 PM   #2 (permalink)
UH-Matt
Administrator
 
UH-Matt's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 8,135
Re:PHP and javascript

<a href="index.php" OnMouseOver="nav_1.src='but_home2.gif'" OnMouseOut="nav_1.src='but_home.gif'"&gt ;<img src="but_home.gif" name="nav_1" border="0"></a><img src="but_gap.gif">

Above is the mouseover code i use.
__________________
.
Matt
UnitedHosting Staff

For official support please use our helpdesk at UnitedSupport.co.uk

UnitedHosting proudly hosting more than 20,000 sites since 1998.
UH-Matt is offline   Reply With Quote
Old 16th February 2003, 06:58 PM   #3 (permalink)
dwilson
Registered User
 
Join Date: Nov 2002
Location: Kansas City MO
Posts: 549
Send a message via ICQ to dwilson Send a message via AIM to dwilson Send a message via Yahoo to dwilson
Re:PHP and javascript

it's working now. Wierd. It's just a bad coding day for me.
__________________
Derik Wilson
dwilson is offline   Reply With Quote
Old 16th February 2003, 07:07 PM   #4 (permalink)
dwilson
Registered User
 
Join Date: Nov 2002
Location: Kansas City MO
Posts: 549
Send a message via ICQ to dwilson Send a message via AIM to dwilson Send a message via Yahoo to dwilson
Re:PHP and javascript

Ok. One more question. well..maybe. How do you use quotes within an echo statement since everything is enclosed in quotes to begin with?
__________________
Derik Wilson
dwilson is offline   Reply With Quote
Old 16th February 2003, 07:07 PM   #5 (permalink)
dwilson
Registered User
 
Join Date: Nov 2002
Location: Kansas City MO
Posts: 549
Send a message via ICQ to dwilson Send a message via AIM to dwilson Send a message via Yahoo to dwilson
Re:PHP and javascript

let me rephrase. how do you display quotes within quotes when everything is in quotes to begin with in an echo
__________________
Derik Wilson
dwilson is offline   Reply With Quote
Old 16th February 2003, 07:08 PM   #6 (permalink)
UH-Matt
Administrator
 
UH-Matt's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 8,135
Re:PHP and javascript

try " I think the infront makes it echo rather than be part of the code.
__________________
.
Matt
UnitedHosting Staff

For official support please use our helpdesk at UnitedSupport.co.uk

UnitedHosting proudly hosting more than 20,000 sites since 1998.
UH-Matt is offline   Reply With Quote
Old 16th February 2003, 07:17 PM   #7 (permalink)
dwilson
Registered User
 
Join Date: Nov 2002
Location: Kansas City MO
Posts: 549
Send a message via ICQ to dwilson Send a message via AIM to dwilson Send a message via Yahoo to dwilson
Re:PHP and javascript

it didn't like that.

I ended up including it and then echoing the rest of the page. eewww! lol ;D
__________________
Derik Wilson
dwilson is offline   Reply With Quote
Old 16th February 2003, 07:21 PM   #8 (permalink)
UH-Matt
Administrator
 
UH-Matt's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 8,135
Re:PHP and javascript

try /" then
__________________
.
Matt
UnitedHosting Staff

For official support please use our helpdesk at UnitedSupport.co.uk

UnitedHosting proudly hosting more than 20,000 sites since 1998.
UH-Matt is offline   Reply With Quote
Old 16th February 2003, 07:30 PM   #9 (permalink)
Euge
Registered User
 
Euge's Avatar
 
Join Date: Feb 2003
Location: Lost in confusion
Posts: 700
Re:PHP and javascript

Best practice is to use single quotes because its faster anyway.
e.g.
Code:
<?php
echo 'Click <a href="' .  $someVar . '">Here</a>';
?>
What looks like triple quotes above is a double quote and a single quote.
Euge is offline   Reply With Quote
Old 16th February 2003, 07:47 PM   #10 (permalink)
dwilson
Registered User
 
Join Date: Nov 2002
Location: Kansas City MO
Posts: 549
Send a message via ICQ to dwilson Send a message via AIM to dwilson Send a message via Yahoo to dwilson
Re:PHP and javascript

ah. didn't know you could do echo ' ';

cool
__________________
Derik Wilson
dwilson is offline   Reply With Quote
Old 16th February 2003, 08:17 PM   #11 (permalink)
Euge
Registered User
 
Euge's Avatar
 
Join Date: Feb 2003
Location: Lost in confusion
Posts: 700
Re:PHP and javascript

Just remember when using single quotes it is interpreted as literal. It does not parse the string so you can't put variables in there. This is why it is faster.
Euge is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 02:04 PM.

UK Web Hosting  |  UK Reseller Hosting  |  UK Dedicated Servers UnitedHosting  |  UnitedSupport  |  UnitedForums  |  SEO by vBSEO 3.0.0
Copyright © 1998-2008 United Communications Limited. All Rights Reserved. Registered in England and Wales 3651923 - VAT Reg No. 737662309