problems with VAR

O

overdalsveien

hi

This is probably elementary, but since my 'Dear Watson' is not present
I hope you folks can help me::

---------------------------
var dag = date1.getDate();
document.getElementById("selDay1").innerHTML =
makeRequest('test.php?d=1');
-----------------------------------------------

I try to put the value of date1.getDate() as a parameter in the call to
test.php via a makeRequest.

Everything works just fine as long as I use a fixed value for "d" (as
in this example....).
Obviously this is useless, so I want to use the variable "dag".

I've tried som creative variations, but with very poor result.


Help Please.......


\fred Moerman


ps.
 
M

mlansdon

/*pre apologies if I dont understand your inquiry however it appears
your question is a php question and maybe not a javascript inquiry
...?*/
//php code
/*in lieu of your "date1.getDate" that you said comes from a calender i
got todays date*/
$now = date("j");
// then set your dag variable to equal todays day
$dag = $now;
//built up a string and concatenated it onto var with the . notation
$newstr='test.php?d='.$dag ;
// printed result just to show the
echo $newstr;
// here is the var in your code
document.getElementById("selDay1").innerHTML=makeRequest('test.php?d='.$dag);

//
 
O

overdalsveien

/*pre apologies if I dont understand your inquiry however it appears
your question is a php question and maybe not a javascript inquiry
..?*/

[snipp-snapp]

I suppose I didn't fromulate the problem correctly.
sorry

Fortunately I figured out how to make i work::

http://news.overdalsveien.com/

click on a date and 4 interesting (??) flicks-pics are found.


\fred
 
M

mlansdon

i like the pics yes and the calendar app altho i dont understand
dytch(??)lol amazing resolution you have on other photos in your site
i.e. nicco's confirmation ..anywho take care, mark ( from texas)
/*pre apologies if I dont understand your inquiry however it appears
your question is a php question and maybe not a javascript inquiry
..?*/

[snipp-snapp]

I suppose I didn't fromulate the problem correctly.
sorry

Fortunately I figured out how to make i work::

http://news.overdalsveien.com/

click on a date and 4 interesting (??) flicks-pics are found.


\fred
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top