Jump to content

ctjansen

Members
  • Posts

    17
  • Joined

  • Last visited

ctjansen's Achievements

Apprentice

Apprentice (3/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. Hey Guys, The problem has been tackled, the solution found and the program written. For all of you who helped me : THANKSTHANKSTHANKS And for all of you who want to see what it became: My Webpage I have learned a lot, i am even starting to like it , so... until a next time Greetz Casper
  2. I think I have solved the problem, so let me work on it a little and get back to you, and praise you for your help. Til soon Casper
  3. Yes, that sounds logical. I shall change my way and try to do it this way. However, there is still no window opening when i press the button, could you try with this link: http://ctjansen.nl/nuke/modules.php?name=waarbenik (it wil give just stupid data, but its the button that counts... :-) )
  4. So, this evening I have been trying with this line for 90 minutes: echo '<td class='border' style='font-size:11px;'> <INPUT type=button value=\"meer\" onClick=\"http://www.ctjansen.nl/nuke/modules/waarbenik/map.php?recno=$row[recno];\"></td>'; and only getting this stupid error: Parse error: syntax error, unexpected T_CLASS, expecting ',' or ';' in /home/jlolxjqh/public_html/nuke/modules/waarbenik/index.php on line 119 (I am asuming onclick is PHP, cause I am in PHP mode) if i wasn´t bold already, i would pull the hairs right out.....grrrr
  5. The reason I thought it would be easier not to open a window is that I have this function : function popitup2() { newwindow2=window.open('','name','height=200,width=150'); var tmp = newwindow2.document; var jrecno = "<?php echo $recno; ?>"; tmp.write('<html><head><title>popup</title>'); tmp.write('</head><body><p>this is once again a popup.</p>'); tmp.write(jrecno); tmp.write('<p><a href="java script:alert(self.location.href)">view location</a>.</p>'); tmp.write('<p><a href="java script:self.close()">close</a> the popup.</p>'); tmp.write('<p><a href="java script:self.close()">close</a> the popup.</p>'); tmp.write('</body></html>'); tmp.close(); } which pops up and writes variables without needing anything else. I would not know how to change the opening part only. casper
  6. Steve, don´t be sorry. I am so glad with the help you are giving me. However, I do NOT want a new window to open, because in map.php I have a routine which opens the popup window already, and I do not want two windows to open. I just need the line(or button) to start map.php. WITHOUT openeing a window. Possible?
  7. Yes, this works fine, for one problem. (haha, always ONE problem left). It should open a window (which it doesn´t), instead of calling map.php. can somebody tell me what to change in the line <INPUT type="button" value="meer" onClick="window.open('http://www.ctjansen.nl/nuke/modules/waarbenik/map.php?recno=$row[recno] ,'mywindow','width=150,height=200')"> instead of opening a window, starting map.php Please...
  8. I wish life was so easy.. echo '<td class="border" style="font-size:9px;">'.$row[omschr_dag].'</td>'; echo '<td class='border' style='font-size:11px;'>'<FORM> <INPUT type="button" value="meer" onClick="window.open('http://www.ctjansen.nl/nuke/modules/waarbenik/map.php?recno=".$row[recno]." ','mywindow','width=150,height=200')"> </FORM> echo '</a></td>'; gives me this: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/jlolxjqh/public_html/nuke/modules/waarbenik/index.php on line 119 (line 119 is the one with the FORM statement)
  9. Yes, I think it does not apply to me. Lets do one step back. in my main program, a table is set up with this link inside: echo "<td class='border' style='font-size:11px;'><a href=http://www.ctjansen.nl/nuke/modules/waarbenik/map.php?recno=".$row[recno]." > meer "; the link opens map.php whit the ´recno´ (record number) of the data the browser want to see (and also a blank window, which is what i do not want) in Map.php I read the data from the database : $q = 'SELECT * FROM log_new WHERE recno = '.$recnum; $result = mysql_query($q); if($result === false) exit('Query error'); and then have a function called popitup to do the popup and the printing of the data into this popup: function popitup2() { newwindow2=window.open('','name','height=200,width=150'); var tmp = newwindow2.document; var jrecno = "<?php echo $recno; ?>"; tmp.write('<html><head><title>popup</title>'); tmp.write('<p><a href="java script:self.close()">close</a> the popup.</p>'); tmp.write('</body></html>'); tmp.close(); } popitup2() and I call the function (in this example i only echo recno, but the priciple is the same for all the database data) Easy...? ok, the problem is that the first line opens a fresh window, and the popup opens one as wel, so i have one window to many. So idealy I should change the href in program 1 to a button with the link or so. anybody have a clever idea? sorry to be so persistent, but i am so close to making it work....
  10. YES YES YES did get it to work. Now only one problem left to solve, and I am a happy traveller Ok, as you know, I am putting a link in my table. User can click it, then the map.php is called, with the record number of the data the user wants to see. In map.php i retrieve the data from the dbase, create a popup and print the data in the popup. All just as I wanted it, with one exception.... because i am using a link, my main window/screen is also going blank, since it thinks I guess that map.php is a different screen or so. Mmm, and that is not what I wanted. So either I have to change the link in such a way that the main screen/monitor just stays on the monitor, (some paramter i do not know, using target=blank is not the solution, because then i get a popup AND a new window)or I have to rewrite it all, and instead of using a link (href....), I use a buttun, but then I have to start all over agaian. Can anyone follow me? If so, any advise. Thanks
  11. He Steve, did you actually try this, because I cant get it to work. Can you tell me where you found it, perhaps i can go and study some more there.
  12. Just one more simple question. I am working in PHP. I am calling another php file with this link: echo "<td class='border' style='font-size:11px;'><a href=http://www.ctjansen.nl/nuke/modules/waarbenik/map.php?recno=".$row[recno]." target=_blank> meer "; now in map.php i can acces this passed recno variable with this: echo $_GET["recno"] ; but a few lines further on I am switching to javascript. How do i acces the same variable in Javascript (in the same program?) say I open a popup in javascript (which was my intention al along) , and I want to print rekno in this popup window? Should be simple... I hope? Casper
  13. Hey Steve, yes, that helped. I am on my way agaian, thanks Casper
  14. Hey guys, thanx for helping me. Stevevan...Workum hu, nice quite little town. Lots of farmers I think. Ever been there...? You should.... Speak any Dutch, or only the bad words? Anyway, i figured I had to do some javasripting, the problem is hoewever that the routine that puts the log on the screen is PHP and i cannot in the loop, just swicth to javascript. Here is how it works: First I make the connection with the dbase, so far no problem. Then I read the entire log file: $query = "SELECT * FROM log_new ORDER BY datum DESC, beg_km DESC "; $result = mysql_query($query); ?> then make the collums and print the table: <table style="text-align:center; empty-cells:show; border-collapse: collapse; width: 100%;"> <tr> <td style="background-color: transparent; text-align:center; padding:0px 0px 0px 0px; "> <TABLE bgcolor="lightgrey" border="2" width="100%"> <th class="border">Datum</th> <th class="border">Land</th> <th class="border">Plaats</th> <th class="border">Weer</th> <th class="border" >Km gereden</th> <th class="border" colspan="2">Mijn positie</th> <th class="border" >Opmerking</th> <th class="border" >meer</th> </tr> <?php while ($row=mysql_fetch_array($result)) { $breedte_deg = $row[end_b_deg]; $breedte_deg += 0; $breedte_deg = round($end_b_deg); $breedte_min = $row[end_b_min]; $breedte_min += 0; $breedte_min = round($end_b_min); $breedte_sec = $row[end_b_sec]; $breedte_sec += 0; $breedte_sec = round($end_b_sec); $lengte_deg = $row[end_l_deg]; $lengte_deg += 0; $lengte_deg = round($end_l_deg); $lengte_min = $row[end_l_min]; $lengte_min += 0; $lengte_min = round($end_l_min); $lengte_sec = $row[end_l_sec]; $lengte_sec += 0; $lengte_sec = round($end_l_sec); /*echo '<tr>';*/ $km = $row[end_km] - $row[beg_km]; $date = Dateconvert($row[datum],2); echo '<td class="border" style="font-size:11px;">'.$date.'</td>'; echo '<td class="border" style="font-size:11px;">'.$row[land].'</td>'; echo '<td class="border" style="font-size:11px;">'.$row[end_plaats].'</td>'; echo '<td class="border" style="font-size:9px;">'.$row[end_weer].'</td>'; /*echo '<td class="border" style="font-size:11px;">'.$row[end_temp].'ºC</td>';*/ echo '<td class="border" style="font-size:11px;">'.$km.'</td>'; echo "<td class='border' style='font-size:11px;'><a href=http://www.mapquest.com/maps/map.adp?searchtype=address&formtype=latlong&latlongtype=degrees&latdeg=".$breedte_deg."&latmin=".$breedte_min."&latsec=".$breedte_sec."&longdeg=".$lengte_deg."&longmin=".$lengte_min."&longsec=".$lengte_sec."&zoom=2 target=_blank>".$row[N_S]." ".$row[breedte_deg]."º ".$row[breedte_min]."' "; echo $row[breedte_sec].'"</a></td>'; echo "<td class='border' style='font-size:11px;'><a href=http://www.mapquest.com/maps/map.adp?searchtype=address&formtype=latlong&latlongtype=degrees&latdeg=".$breedte_deg."&latmin=".$breedte_min."&latsec=".$breedte_sec."&longdeg=".$lengte_deg."&longmin=".$lengte_min."&longsec=".$lengte_sec."&zoom=2 target=_blank>".$row[E_W]." ".$row[lengte_deg]."º ".$row[lengte_min]."' "; echo $row[lengte_sec].'"</a></td>'; echo '<td class="border" style="font-size:9px;">'.$row[omschr_dag].'</td>'; and now i need to put the link or the button, and i do not know how to do this. I have tried this: echo "<td class='border' style='font-size:11px;'><a href=http://www.ctjansen.nl/nuke/modules/waarbenik/map.php?land=".$row[land]."&datum=".$row[datum]."&beg_plaats=".$row[beg_plaats]." target=blank > meer info "; This links to a new program ´map.php´ and passes the variables. But then i do not know hot to work with these variables inside map.php. It might be better to keep it all together because switching from php files i think is not so nice. if you see al this, you might think i am a hell of a prgrammer , but I have not made this. I wish I could. Could anybody give me an example of how to continue to get it to work. It must be so simple for all you wise programmers (lick*lick) Hope to hear from you Casper
  15. Hey stevevan Well, as I mentioned I have this data in my Mysql dbase. On a daily basis I keep things like road conditions., fuel consumption, weather, milage, etc etc. The user can see my log here: http://ctjansen.nl/nuke/modules.php?name=waarwasik but this shows only a little part of all the data I keep per day. So I want sort of like a button under the last collumn (the collumn is called ´Meer´, Dutch for ´more´) and when the user clicks the button, a popup window appears with the rest of the info of that day. The user hits the ´close´button on the popup,, it disappears and the user happily browses on. Sounds simple to me, but not being a programmer i might see it to simple I have tried a few things, but nothing worked satisfactory. Any ideas, any help? Casper
×
×
  • Create New...