hi! thanx for reading!
my problem: I want to print :
7] Xerox: print '<a href='.
'"javascript:;"'.
"onClick='hideAll(); showHideLayers ('s6','','show')'>
test</a>";
with php
but I can't get it work becouse php ends reading efter ; but I have to have
it printed.. how do I acheff it? 8 10480
Carramba wrote: hi! thanx for reading!
my problem: I want to print : 7] Xerox: print '<a href='. '"javascript:;"'. "onClick='hideAll(); showHideLayers ('s6','','show')'> test</a>";
with php
but I can't get it work becouse php ends reading efter ; but I have to have it printed.. how do I acheff it?
I don't think it does. The source of your document will be:
<a href="javascript :;"onClick='hideAll(); showHideLayers ('s6','','show')'>
test</a>
Unless I've completely misunderstood your question.
--
MeerKat
the output is:
<a href="javascript:;"onClick='hideAll(); showHideLayers('d2','','show')'>
test</a>
I need it to by <a href="javascript:;" onClick="hideAll();
showHideLayers('d2','','show')"> test</a>
now I can't get out pu of " .. eah..
I have tryed
print '<a href='.'"javascript:;"'.'onClick='.'"hideAll();
showHideLayers('d2','','show')"'.'> test</a>';
then I get error : parse error, unexpected T_STRING ...
Carramba wrote: the output is: <a href="javascript:;"onClick='hideAll(); showHideLayers('d2','','show')'> test</a>
I need it to by <a href="javascript:;" onClick="hideAll(); showHideLayers('d2','','show')"> test</a>
now I can't get out pu of " .. eah..
I have tryed
print '<a href='.'"javascript:;"'.'onClick='.'"hideAll(); showHideLayers('d2','','show')"'.'> test</a>'; then I get error : parse error, unexpected T_STRING ...
Try this:
print "<a href=\"javascript :;\" onClick=\"hideAll();
showHideLayers('d2','','show')\">test</a>";
Notice I've escaped (ie, added \) all the double quotes, except those
around the whole string.
--
MeerKat
thanx mate!
it worked just fine.. I was trying same thing but wasn't near.. can you
explain why it's works like that?
print "<a href=\"javascript :;\" onClick=\"hideAll();
showHideLayers('d2','','show')\">test</a>";
u start with \ " and finish with \" thought it was like \"somestring"\ ...
its more logical for me.. tag start \ tag ends \ ... hoppe you have time to
explayn so I would need to ask similar qestions...
and thanx again!
"MeerKat" <li****************@blueyonder.co.uk> skrev i meddelandet
news:MR********************@news-text.cableinet.net... Carramba wrote:
the output is: <a href="javascript:;"onClick='hideAll();
showHideLayers('d2','','show')'> test</a>
I need it to by <a href="javascript:;" onClick="hideAll(); showHideLayers('d2','','show')"> test</a>
now I can't get out pu of " .. eah..
I have tryed
print '<a href='.'"javascript:;"'.'onClick='.'"hideAll(); showHideLayers('d2','','show')"'.'> test</a>'; then I get error : parse error, unexpected T_STRING ...
Try this:
print "<a href=\"javascript:;\" onClick=\"hideAll(); showHideLayers('d2','','show')\">test</a>";
Notice I've escaped (ie, added \) all the double quotes, except those around the whole string.
-- MeerKat
Carramba wrote: thanx mate!
No problem.
it worked just fine.. I was trying same thing but wasn't near.. can you explain why it's works like that?
I'll try... :)
The \ characters are not tags. They are -not- there to 'start' and 'end'
a piece of text. They are there to say that the next character should be
treated as part of the string and not as anything 'special'. So \" means
that the double quote should be outputted.
I hope this helps.
MK.
print "<a href=\"javascript:;\" onClick=\"hideAll(); showHideLayers('d2','','show')\">test</a>";
u start with \ " and finish with \" thought it was like \"somestring"\ ... its more logical for me.. tag start \ tag ends \ ... hoppe you have time to explayn so I would need to ask similar qestions...
and thanx again!
"MeerKat" <li****************@blueyonder.co.uk> skrev i meddelandet news:MR********************@news-text.cableinet.net...
Carramba wrote:
the output is: <a href="javascript:;"onClick='hideAll(); showHideLayers('d2','','show')'> test</a>
I need it to by <a href="javascript:;" onClick="hideAll(); showHideLayers('d2','','show')"> test</a>
now I can't get out pu of " .. eah..
I have tryed
print '<a href='.'"javascript:;"'.'onClick='.'"hideAll(); showHideLayers('d2','','show')"'.'> test</a>'; then I get error : parse error, unexpected T_STRING ...
Try this:
print "<a href=\"javascript:;\" onClick=\"hideAll(); showHideLayers('d2','','show')\">test</a>";
Notice I've escaped (ie, added \) all the double quotes, except those around the whole string.
-- MeerKat
--
MeerKat
ok!
know I get it!
thanx!
"MeerKat" <li****************@blueyonder.co.uk> skrev i meddelandet
news:cd*********************@news-text.cableinet.net... Carramba wrote:
thanx mate!
No problem.
it worked just fine.. I was trying same thing but wasn't near.. can you explain why it's works like that?
I'll try... :)
The \ characters are not tags. They are -not- there to 'start' and 'end' a piece of text. They are there to say that the next character should be treated as part of the string and not as anything 'special'. So \" means that the double quote should be outputted.
I hope this helps.
MK.
print "<a href=\"javascript:;\" onClick=\"hideAll(); showHideLayers('d2','','show')\">test</a>";
u start with \ " and finish with \" thought it was like \"somestring"\
.... its more logical for me.. tag start \ tag ends \ ... hoppe you have time
to explayn so I would need to ask similar qestions...
and thanx again!
"MeerKat" <li****************@blueyonder.co.uk> skrev i meddelandet news:MR********************@news-text.cableinet.net...
Carramba wrote:
the output is: <a href="javascript:;"onClick='hideAll();
showHideLayers('d2','','show')'>
test</a>
I need it to by <a href="javascript:;" onClick="hideAll(); showHideLayers('d2','','show')"> test</a>
now I can't get out pu of " .. eah..
I have tryed
print '<a href='.'"javascript:;"'.'onClick='.'"hideAll(); showHideLayers('d2','','show')"'.'> test</a>'; then I get error : parse error, unexpected T_STRING ... Try this:
print "<a href=\"javascript:;\" onClick=\"hideAll(); showHideLayers('d2','','show')\">test</a>";
Notice I've escaped (ie, added \) all the double quotes, except those around the whole string.
-- MeerKat
-- MeerKat
Hello :)
shouldnt that read more like
echo '<a href="javascript :void(0);" onclick="hideAll();
showHideLayers('s6','','show')">test</a>';
much easier to read... why even echo it at all though?
-jpdr
TTG
Carramba wrote: hi! thanx for reading!
my problem: I want to print : 7] Xerox: print '<a href='. '"javascript:;"'. "onClick='hideAll(); showHideLayers ('s6','','show')'> test</a>";
with php
but I can't get it work becouse php ends reading efter ; but I have to have it printed.. how do I acheff it?
yeah.. why not...
I can't tell you I just use print, becouse echo is like more calling php and
functions etc.. but you are 100% right it's work greate too..
"haptiK" <no****@nospam.com> skrev i meddelandet
news:bh**********@titan.btinternet.com... Hello :)
shouldnt that read more like
echo '<a href="javascript:void(0);" onclick="hideAll(); showHideLayers('s6','','show')">test</a>';
much easier to read... why even echo it at all though?
-jpdr TTG
Carramba wrote:
hi! thanx for reading!
my problem: I want to print : 7] Xerox: print '<a href='. '"javascript:;"'. "onClick='hideAll(); showHideLayers ('s6','','show')'> test</a>";
with php
but I can't get it work becouse php ends reading efter ; but I have to
have it printed.. how do I acheff it?
This discussion thread is closed Replies have been disabled for this discussion. Similar topics
3 posts
views
Thread by Bruce W...1 |
last post: by
|
1 post
views
Thread by Asteras |
last post: by
|
42 posts
views
Thread by Prashanth Badabagni |
last post: by
|
17 posts
views
Thread by subnet |
last post: by
|
5 posts
views
Thread by Sweety |
last post: by
|
3 posts
views
Thread by Dan |
last post: by
|
3 posts
views
Thread by Jeff |
last post: by
|
20 posts
views
Thread by dis_is_eagle |
last post: by
|
3 posts
views
Thread by Peter Michaux |
last post: by
| | | | | | | | | | |