Jazzy 1012
asked on
Automatically click the button for you if there is a date
I have a file called file.php which has:
Jasmine.php:
$row2= pg_fetch_array($result2);
$website = 'http://validate/?id='.$newDateString;
<tbody>
<tr>
<td><?php echo'<a href="'.$website.'">'. $row['name']; ?></td>
The code sends to a file named jasmine.php the url with the date since jasmine contains a calendar. It sends it when you click on the date which contains a link to jasmine.Jasmine.php:
<div id="content">
<h2>Hello, Please let me know which date you are looking for </h2>
<div><label style="font-size: 14pt; font-family: Verdana;">Posting Date: </label></div><br />
<input type="text" id="date" value= "<?php echo $_GET['id']?>" class="css-input" placeholder="Posting Date..." readonly="readonly" /><br /><br />
<input type="button" id="validate" value="Let's work!" class="btn" />
<input type="button" id="clear" value="Wanna go Again?" class="btn" />
</div>
<div id="contentarea2" style="display: none;">
<h2>Results:</h2>
<div class="view_alerts">
<table>
<tr>
<td>
Code
</td>
<td>
# Posted
</td>
</tr>
<tbody id="view_alerts_tbody">
</tbody>
</table>
</div>
</div>
In Jasmine, I get the date already written for me from file.php, all I need to do is click the button so it could show me a table, is there a way, that it clicks the button on its own if theres a date written, so when I go on that link, it already puts the date and takes me to the table in jasmine.php
ASKER
ok on file.php again i have a table like this:
When I click on the name it takes me to jasmine.php
with the date (which if I click on the first name the date will show as "04-11-2015")
So the jasmine link would be "/jasmin.php?id=04/11/2015 " and All I need to do is click the button called "Let's work!" for it to run the date and give me data back. Is there a way to just show me the data directly without needing to click the button, since the date it already there? Should I show you my php code that gets me the data?
Name Date
----------- -----------
2931550_S21_17806016900.100.6f8 04-11-2015
NGS_ILMEB_20140728 09-29-2014
931550_S21_18780304.03.ab 01-04-2015
When I click on the name it takes me to jasmine.php
with the date (which if I click on the first name the date will show as "04-11-2015")
So the jasmine link would be "/jasmin.php?id=04/11/2015
So the jasmine link would be "/jasmin.php?id=04/11/2015What do you mean "run the date and give me data back" - what is linked to the "Lets's Work" button I don't see a form or any javascript." and All I need to do is click the button called "Let's work!" for it to run the date and give me data back
ASKER
Hold on - I am playing catchup here - you are continuing on the assumption that we have full knowledge of your setup - which is not the case. You need to take this one step at a time.
I have no idea what your system does or how it hangs together so you need to take me through it. Based on your description so far I am still confused as to what is happening.
Lets start from the beginning
You have a script that produces a list of links.
The links point to a page "jasmine.php" and include a date in the URL.
First question - what happens when you click the link.
A) Does the link take you to a new page
OR
B) Do you have some javascript that intercepts the click and makes an AJAX call to the target page.
I have no idea what your system does or how it hangs together so you need to take me through it. Based on your description so far I am still confused as to what is happening.
Lets start from the beginning
You have a script that produces a list of links.
The links point to a page "jasmine.php" and include a date in the URL.
First question - what happens when you click the link.
A) Does the link take you to a new page
OR
B) Do you have some javascript that intercepts the click and makes an AJAX call to the target page.
ASKER
It takes me to a new page which has the popup calendar I showed, with the date displaying inside
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Well done.
ASKER
I found the solution myself
Which code - what does it send and how - can you show me.