UnitedForums.co.uk
>
UnitedHosting Community
>
Website Development & Scripting
PHP and javascript
User Name
Remember Me?
Password
Register
FAQ
Members List
Search
Today's Posts
Mark Forums Read
Thread Tools
Rate Thread
Display Modes
16th February 2003, 06:26 PM
#
1
(
permalink
)
dwilson
Registered User
Join Date: Nov 2002
Location: Kansas City MO
Posts: 549
PHP and javascript
Can you not use mouseover code in PHP files? Mine is not working.
__________________
Derik Wilson
dwilson
View Public Profile
Visit dwilson's homepage!
Find More Posts by dwilson
16th February 2003, 06:48 PM
#
2
(
permalink
)
UH-Matt
Administrator
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'"> ;<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
View Public Profile
Visit UH-Matt's homepage!
Find More Posts by UH-Matt
16th February 2003, 06:58 PM
#
3
(
permalink
)
dwilson
Registered User
Join Date: Nov 2002
Location: Kansas City MO
Posts: 549
Re:PHP and javascript
it's working now. Wierd. It's just a bad coding day for me.
__________________
Derik Wilson
dwilson
View Public Profile
Visit dwilson's homepage!
Find More Posts by dwilson
16th February 2003, 07:07 PM
#
4
(
permalink
)
dwilson
Registered User
Join Date: Nov 2002
Location: Kansas City MO
Posts: 549
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
View Public Profile
Visit dwilson's homepage!
Find More Posts by dwilson
16th February 2003, 07:07 PM
#
5
(
permalink
)
dwilson
Registered User
Join Date: Nov 2002
Location: Kansas City MO
Posts: 549
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
View Public Profile
Visit dwilson's homepage!
Find More Posts by dwilson
16th February 2003, 07:08 PM
#
6
(
permalink
)
UH-Matt
Administrator
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
View Public Profile
Visit UH-Matt's homepage!
Find More Posts by UH-Matt
16th February 2003, 07:17 PM
#
7
(
permalink
)
dwilson
Registered User
Join Date: Nov 2002
Location: Kansas City MO
Posts: 549
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
View Public Profile
Visit dwilson's homepage!
Find More Posts by dwilson
16th February 2003, 07:21 PM
#
8
(
permalink
)
UH-Matt
Administrator
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
View Public Profile
Visit UH-Matt's homepage!
Find More Posts by UH-Matt
16th February 2003, 07:30 PM
#
9
(
permalink
)
Euge
Registered User
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
View Public Profile
Find More Posts by Euge
16th February 2003, 07:47 PM
#
10
(
permalink
)
dwilson
Registered User
Join Date: Nov 2002
Location: Kansas City MO
Posts: 549
Re:PHP and javascript
ah. didn't know you could do echo ' ';
cool
__________________
Derik Wilson
dwilson
View Public Profile
Visit dwilson's homepage!
Find More Posts by dwilson
16th February 2003, 08:17 PM
#
11
(
permalink
)
Euge
Registered User
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
View Public Profile
Find More Posts by Euge
«
Previous Thread
|
Next Thread
»
Currently Active Users Viewing This Thread: 1
(0 members and 1 guests)
Thread Tools
Show Printable Version
Email this Page
Display Modes
Rate This Thread
Linear Mode
Switch to Hybrid Mode
Switch to Threaded Mode
Rate This Thread
:
5 : Excellent
4 : Good
3 : Average
2 : Bad
1 : Terrible
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
.
Archive
-
Top
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