Topic: $("someId") ? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=26699" title="Pages that link to Topic: $(&amp;quot;someId&amp;quot;) ? (Page 1 of 1)" rel="nofollow" >Topic: $(&quot;someId&quot;) ? <span class="small">(Page 1 of 1)</span>\

 
Maskkkk
Paranoid (IV) Inmate

From: Willaimsport, PA, US of A the hole i
Insane since: Mar 2002

posted posted 09-21-2005 17:19

What does the $("someId") operator do? I've never seen this before and I can't seem to find anything out about it.



- AIM: MASKKKK

01001101011000010111001101101011011010110110101101101011

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 09-21-2005 21:36

in php? It's a 'variable variable'.
It should probably read ${"some str which might be stored in another variable"}.
So you have
$whatever = "Hello";
$shu = "whatever";
print ${$shu};
will output "Hello".

All clear?

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 09-21-2005 21:59

I believe the general name for that sort of thing is "indirection."

CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 09-22-2005 00:27
quote:

Maskkkk said:

I've never seen this before and I can't seem to find anything out about it.




silly question but how do you know about it then?

Later,

C:\

Arthurio
Paranoid (IV) Inmate

From: the dungeons, corridor 13, cell 3736
Insane since: Jul 2003

posted posted 09-23-2005 19:20

$asd = "bla";
$$asd == $bla

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 09-23-2005 19:34

It would certainly help if you let us in on what language you are referring to, and where/how you came across this...

Maskkkk
Paranoid (IV) Inmate

From: Willaimsport, PA, US of A the hole i
Insane since: Mar 2002

posted posted 09-27-2005 13:25

Oh I figured it out...

Oh and it was in Javascript.

It's actually part of the DWR (Direct Web Remoting) API, and I think its a function to return an element based on your browser type. It's quite odd.



- AIM: MASKKKK

01001101011000010111001101101011011010110110101101101011



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu