By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,504 Members | 1,110 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,504 IT Pros & Developers. It's quick & easy.

problems with VAR

P: n/a
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.
"date1.getDate" comes from a calender
"makeRequest('test.php?d=XX')" makes a XMLHttpRequest to retrieve data from the server.
Jul 13 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
/*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=makeR equest('test.php?d='.$dag);

//

ov***********@gmail.com wrote:
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.
"date1.getDate" comes from a calender
"makeRequest('test.php?d=XX')" makes a XMLHttpRequest to retrieve data from the server.
Jul 13 '06 #2

P: n/a

ml******@gmail.com wrote:
/*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

Jul 13 '06 #3

P: n/a
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)
ov***********@gmail.com wrote:
ml******@gmail.com wrote:
/*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
Jul 20 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.