swiss
09-02-2006, 01:33 PM
Hey guys,
I need two scripts for a homepage I am currently changing. It is completely based on Perl, PHP, JavaScript and HTML. There is nothing I can change about the base-scripting...
1.
I want to have a dynamic "hint of the day"-thingy. Everytime the page is loaded (or reloaded) another hint should appear on the page. The hints could probably be stored in a CSV-File and the HTML Code must include something like "pic a random hint and display it on the page". Can anyone help me with that ? I would be probably enough to know how to generate a random number between 1 and 30 in PHP or alike and how to read item number *whatever* of the CSV-File.
2.
I have a dynamically generated page with a radiobutton called "_lowres vakue=0" and another called "_lowres value=1 checked". Now I need a script or something that can be put beneath the dynamic call that changes the property of button 1 to checked and button 2 to - well - nothing. Like this:
Current page:
<input type=radio name=_lowres value=0>Layoutbild
<input type=radio name=_lowres value=1 checked>Feinbild
That's what I want it to be:
<input type=radio name=_lowres value=0 checked >Layoutbild
<input type=radio name=_lowres value=1>Feinbild
is there a call like "set property of button "_lowres value=0" to checked" (that's how it would work with AppleScript ....
Thank a lot in advance!!!!!
Cheers,
:cheers:
swiss
I need two scripts for a homepage I am currently changing. It is completely based on Perl, PHP, JavaScript and HTML. There is nothing I can change about the base-scripting...
1.
I want to have a dynamic "hint of the day"-thingy. Everytime the page is loaded (or reloaded) another hint should appear on the page. The hints could probably be stored in a CSV-File and the HTML Code must include something like "pic a random hint and display it on the page". Can anyone help me with that ? I would be probably enough to know how to generate a random number between 1 and 30 in PHP or alike and how to read item number *whatever* of the CSV-File.
2.
I have a dynamically generated page with a radiobutton called "_lowres vakue=0" and another called "_lowres value=1 checked". Now I need a script or something that can be put beneath the dynamic call that changes the property of button 1 to checked and button 2 to - well - nothing. Like this:
Current page:
<input type=radio name=_lowres value=0>Layoutbild
<input type=radio name=_lowres value=1 checked>Feinbild
That's what I want it to be:
<input type=radio name=_lowres value=0 checked >Layoutbild
<input type=radio name=_lowres value=1>Feinbild
is there a call like "set property of button "_lowres value=0" to checked" (that's how it would work with AppleScript ....
Thank a lot in advance!!!!!
Cheers,
:cheers:
swiss