Re: PHP/Javascript/HTML problem
Phil Powell wrote:[color=blue]
> I am having a potential PHP/Javascript/HTML conflict going on in my
> code that I simply can't resolve - been wracking my brain for a good
> hour over this one and have come up with no good solution.
>
> My resulting HTML tag MUST look like this:
>
> quote:
> <a href=index.php? section=person& action=delete_d ept&id=1
> onClick="return isOKDelete('Are you sure you wish to delete Department
> \"Phil\"?')" >
>
>
> Where
>
> $deptName = 'Phil'
> and
> $section = 'person'
> and
> $action = 'delete_dept'
>
> I can't figure out how to write my PHP code to ensure that that HTML
> tag will look like the above example and work in a
> dynamically-generated Javascript function, ALL at the very same time!
>
> Help appreciated, this is a showstopper for my app!
>
> Thanx
> Phil
>
> PS: I need this cross-posted in the hope of finding someone as equally
> skilled in PHP as in Javascript to be able to come up with the best
> idea for this as I can't.[/color]
I've not read the long list of posts the come forward with javascript
solutions, but I think its a PHP issue, and you should go to
and look into
urldecode(), urlencode(), rawurlencode() and rawurldecode()
One of them is bound to get you there...
randelld
Phil Powell wrote:[color=blue]
> I am having a potential PHP/Javascript/HTML conflict going on in my
> code that I simply can't resolve - been wracking my brain for a good
> hour over this one and have come up with no good solution.
>
> My resulting HTML tag MUST look like this:
>
> quote:
> <a href=index.php? section=person& action=delete_d ept&id=1
> onClick="return isOKDelete('Are you sure you wish to delete Department
> \"Phil\"?')" >
>
>
> Where
>
> $deptName = 'Phil'
> and
> $section = 'person'
> and
> $action = 'delete_dept'
>
> I can't figure out how to write my PHP code to ensure that that HTML
> tag will look like the above example and work in a
> dynamically-generated Javascript function, ALL at the very same time!
>
> Help appreciated, this is a showstopper for my app!
>
> Thanx
> Phil
>
> PS: I need this cross-posted in the hope of finding someone as equally
> skilled in PHP as in Javascript to be able to come up with the best
> idea for this as I can't.[/color]
I've not read the long list of posts the come forward with javascript
solutions, but I think its a PHP issue, and you should go to
and look into
urldecode(), urlencode(), rawurlencode() and rawurldecode()
One of them is bound to get you there...
randelld
Comment