Current location: Hot Scripts Forums » Programming Languages » PHP » Problem: Php with java!?!


Problem: Php with java!?!

Reply
  #1 (permalink)  
Old 04-18-04, 01:08 AM
1jetsam 1jetsam is offline
Wannabe Coder
 
Join Date: Apr 2004
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Problem: Php with java!?!

I am trying to do this thing, where if $a (for example) is not equal to $b, then...
Now I want to make it print something with javascript on the screen, like so.
Code:
echo"<a href='bla.php' onmouseover='this.style.cursor='default';'>bla</a>";
But the problem is the javascript doesn't work because it has to be contained in " instead of '. But if i change it, then it wont print on the screen...please help!
Thanks very, very, very much!
__________________
Quate CMS 0.3.3 Released - A simple, fast Content Management System.
Reply With Quote
  #2 (permalink)  
Old 04-18-04, 01:20 AM
the_mole001's Avatar
the_mole001 the_mole001 is offline
Newbie Coder
 
Join Date: Feb 2004
Location: Australia
Posts: 96
Thanks: 0
Thanked 0 Times in 0 Posts
Hello 1jetsam,

Simple solution is forget the 's, like so:

echo"<a href='bla.php' onmouseover='this.style.cursor=default;'>bla</a>";

I tried it on my pc and had no worries so I hope you find it the same.

Peter
Reply With Quote
  #3 (permalink)  
Old 04-18-04, 04:17 AM
Puno Puno is offline
Newbie Coder
 
Join Date: Mar 2004
Location: Spain (EU) Colorado (USofA)
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb Fricking "s =)

Could you not just escape the " with a backslash?
Like

PHP Code:

$example "This string has \" in it but I want it to appear on the screen";
echo(
$example); 
To me it ouputs
This string has " in it but I want it to appear on the screen

Or am I missing something?
Hope I helped and good luck.

_______________________
Oh, and please mind the difference between Java and Javascript...
__________________
Puno Bleedingrose,
Spectrum 48K BASIC's was cooler, it had a BEEP instruction.
Reply With Quote
  #4 (permalink)  
Old 04-18-04, 10:12 AM
1jetsam 1jetsam is offline
Wannabe Coder
 
Join Date: Apr 2004
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
That helps alot, thanks.
__________________
Quate CMS 0.3.3 Released - A simple, fast Content Management System.
Reply With Quote
Reply

Bookmarks


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

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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
php in linux problem usman PHP 6 05-15-04 11:57 AM
problem with PHP script on qmail server localrec PHP 2 03-25-04 01:49 PM
Javascript vs PHP, problem with arrays Chuff JavaScript 0 10-03-03 04:01 AM
Problem with java links Kingfishsj JavaScript 0 08-01-03 08:09 AM
PHP with JAVA funkydunk PHP 0 07-21-03 09:40 AM


All times are GMT -5. The time now is 10:27 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.