הוסטס - פורום אחסון האתרים הגדול בישראל

הוסטס - פורום אחסון האתרים הגדול בישראל (https://hosts.co.il/forums/index.php)
-   פורום תיכנות (https://hosts.co.il/forums/forumdisplay.php?f=14)
-   -   לעשות את הפעולה של השליחה בחלון חדש...כיצד? (https://hosts.co.il/forums/showthread.php?t=23050)

-VladK- 01-06-06 18:52

לעשות את הפעולה של השליחה בחלון חדש...כיצד?
 
שלום.
נגיד יש לי תופס...עכשיו אני רוצה לבצע את הפעולה של השליחה בחלון חדש...כלומר כשאני לוחץ על שלח אז נפתח חלון חדש ומשם נשלחים הנתונים....הנה התופס:
PHP קוד:

<form action="poll.php?method=vote\" method=\"post\">
<div dir=\"rtl\">"
;
$results "<a href=\"poll.php?method=results&id=$id\">";

include 
'db.php';
$sql "SELECT * FROM poll_answers WHERE poll_id = '$id' ORDER BY id ASC";
$res mysql_query($sql) or die(mysql_error());

// Retrieve the Results
while ($newArray mysql_fetch_array($res)) {
   
// Convert the Result set into Variables
   
$id $newArray['id'];
   
$poll_id $newArray['poll_id'];
   
$answer $newArray['answer'];

echo 
"<input type=\"radio\" name=\"answer_id\" value=\"$id\"> $answer<br />";

}
echo 
"</div>
<div dir=\"ltr\" style=\"height:17px;\">
$results<img src=\"2.gif\" width=\"59\" height=\"17\" border=\"0\" /></a> <input type=\"image\" name=\"image\" src=\"1.gif\">
</div>
</div><input type=\"hidden\" name=\"poll_id\" value=\"$id\">\n"
;
echo 
"</form>"

מה עלי לעשות על מנת שזה יעבוד?

Itay 01-06-06 19:07

בשורה של ה-form אתה מכניס target="_blank"

-VladK- 01-06-06 19:24

ציטוט:

נכתב במקור על ידי Itay
בשורה של ה-form אתה מכניס target="_blank"

אני יכול במקום לעשות TARGET לעשות בJS שזה יפתח בחלון חדש אבל כזה שאני מגדיר את הגדלים וכל זה...?

Itay 01-06-06 19:35

אתה יכול לעשות ברגע שלוחצים על השליחה אז יפתח חלון חדש ע"י JS, לחלון הזה אתה נותן שם
ואז ב-target אתה צריך לכתוב את השם של החלון (לא בטוח אם זה עובד בדיוק ככה.. פשוט שנים לא שיחקתי עם שליחת מידע לחלונות אחרים חח)

-VladK- 01-06-06 19:58

רגע רגע רגע רגע...הקוד אמור להיראות ככה?
HTML קוד:

<form action="poll.php?method=vote\" method=\"post\" target=\"polln\">
<input type=\"image\" name=\"image\" src=\"1.gif\" ONCLICK=\"window.open('poll.php?method=vote', 'polln', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=400,height=260')\">


Itay 01-06-06 20:04

בערך ככה.. תנסה ותבדוק אם עובד לך

Tomer 01-06-06 20:20

עד כמה שאני זוכר:

קוד:

<form action=\"javascript:window.popup('poll.php?method=vote');\" method=\"post\" target=\"polln\">

-VladK- 01-06-06 20:29

יופי עובד לי :) אפשר לנעול


כל הזמנים הם GMT +2. הזמן כעת הוא 05:28.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ