[PHP] Javascript Question
Hey! Sorry for the OT, but since there seems to be no js newsgroup in gmane, I thought maybe someone in here could answer this simple question. I am trying to use javascript's print() to print a frame FROM ANOTHER frame. This is the layout: frameset rows=*,40 frameborder=NO border=0 framespacing=0 frame src=... name=pritableText frame src=... name=printButton scrolling=NO noresize /frameset In printButton I have a simple anchor: a href=# onClick=parent.printableText.focus(); parent.printableText.print(); Yet nothing happens. What's wrong? Thanks in advance, Nicolas Sanguinetti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] I'm Completely Confused
Ok, googling I found: http://www.codelifter.com/main/javascript/printframe.shtml The example in there works ok, so I copied the code into my docs and it didn't work. I'm confused (BTW, parent is all is needed apparently) Could this be happening because I'm using the extension .php instead of .htm or .html? Nicolas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: I'm Completely Confused
Sorry for the new post, this should have been a reply to Javascript Question ([EMAIL PROTECTED]) Greeting, Nicolas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Doh!
Well, I found out why it wasn't working The frameset had the frame named pritableFrame instead of printableFrame so the reference was erroneous. The following works ok: script function printFrame(f) { parent.f.focus(); parent.f.print(); } /script ... a href=javascript: printFrame('printableFrame');Print the Other Frame/a Greetings and thanks, Nicolas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Submitting a form from a tags
Heyp! I wanted to know if there is some way to do the submitting of a form from a normal href link, instead of the big-dumb-gray button. If it can't be done with PHP, how can it be done? Thanks in advance, Nicolas Sanguinetti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: including an html file!!
echo returns 1 on success, so the interpreter first evaluates the expression inside the echo() call, and thus includes the html file, and then, as the evaluation returned 1, it echoes 1 to the final file. You should only do include(...), without the echo. Good luck, Nicolas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Submitting a form from a tags
Thank you very much! N. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Multiple substring replacement
Because it doesn't replace the newlines, just inserts br before them... I liked the implode solution ... (shoulda figured, since I come from a python background ... but I keep saying to myself that py is better and that php can't be treated the same way ... ;) Greetings, and thanks for all the answers, Nicolas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Multiple substring replacement
What's the best way of replacing every ocurrence of a substring in a LARGE string by another (longer) substring? Specifically, I have read the contents of a file into a tring with fread, and now I want to replace all \n with br Thanks in advance Nicolas Sanguinetti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Newbie error with cookies and headers already declared
I'm getting this error: Warning: Cannot add header information - headers already sent by (output started at /home/tiempodemaria/main.php:3) in /home/tiempodemaria/main.php on line 11 With this code in main.php: html ? define(SECONDS_IN_THREE_MONTHS, 3600*24*90); define(OFFSET_WITH_GMT, -3*3600); $has_visited = isset($_COOKIE[TdM_visited]); if (!$has_visited) { setcookie(TdM_visited, (string) (time() + OFFSET_WITH_GMT), time() + OFFSET_WITH_GMT + SECONDS_IN_THREE_MONTHS); // the above (not blank) is line 11 } else { $latestVisit = (int) $_COOKIE[TdM_visited]; setcookie(TdM_visited, (string) (time() + OFFSET_WITH_GMT), time() + OFFSET_WITH_GMT + SECONDS_IN_THREE_MONTHS); } ? meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 link href=styles/main_style.css rel=stylesheet type=text/css body . Does anybody knows what's going on? I don't understand which header is being sent before the setting of the cookie, and I don't understand the :3 in the error description. This page is a frame, so I don't have any head tag, does that matter to php? Thanks in advance, Nicolas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php