View Single Post

  #12 (permalink)  
Old 10-07-2007
tedd
 
Posts: n/a
Default Re: [PHP] A two flavored post

>ALSO:
>
><a href="img.php?i=<?php echo($value);?>" onclick="window.location =
>this.getAttribute( 'href' ) + '&s=' + s; return false;">
>
>can be altered to be:
>
><a href="img.php?i=<?php echo($value);?>"
>onclick="this.setAttribute(this.getAttribute( 'href') + '&s=' + s);">
>
>What exactly do you need to do, anyways? Maybe there'll be some better
>way to do this.


I'm sure there is a better way.

I was just trying to get a user's selection (in an CMS I'm
developing) without a refresh.

Something like this:

http://www.webbytedd.com/c/js-maintain-state/

But ultimately, I was faced with a trade-off.

1) I could use javascript with no refresh, but lose hover;

2) Or, I could use php and maintain hover, but be forced to accept refresh.

So, I went back to php and accomplished what I wanted with a *lot*
less code. My thinking, the user shouldn't object to a refresh while
editing.

Thanks for everyone's help.

Cheers,

tedd

Rob -- it now works with js turned off. :-)
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
Reply With Quote