הרשם שאלות ותשובות רשימת חברים לוח שנה הודעות מהיום

חזור   הוסטס - פורום אחסון האתרים הגדול בישראל > עיצוב גראפי, תכנות על כל שפותיו וקידום ושיווק אתרים > פורום תיכנות

   
|!|

השב
 
כלים לאשכול תצורת הצגה
ישן 09-06-07, 14:30   # 1
darkid
חבר בקהילה
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
הודעות: 324

darkid לא מחובר  

[HTML] תג target...

שלום... במהלך קידוד אתרי ל"התאמה" לתקני הXHTML נתקלתי בבעיה בה תג Target אינו "מאושר"

הכוונה היא שהקוד:
HTML קוד:
<a href="bla.html" target="_blank">קישור</a>
אינו תקין.

התקלה:
קוד:
You have used the attribute named above in your document, but the
document type you are using does not support that attribute for this
element. This error is often caused by incorrect use of the "Strict"
document type with a document that uses frames (e.g. you must use
the "Transitional" document type to get the "target" attribute), or
by using vendor proprietary extensions such as "marginheight" (this
is usually fixed by using CSS to achieve the desired effect instead).    
This error may also result if the element itself is not supported in
the document type you are using, as an undefined element will have no
supported attributes; in this case, see the element-undefined error
message for further information.    
How to fix: check the spelling and case of the element and attribute,
(Remember XHTML is all lower-case) and/or
check that they are both allowed in the chosen document type, and/oR
use CSS instead of this attribute. If you received this error when using the
<embed> element to incorporate flash media in a Web page, see the
FAQ item on valid flash.
]

Last edited by darkid; 09-06-07 at 14:41.. סיבה: שיפור נוסח
  Reply With Quote
ישן 09-06-07, 14:52   # 2
mayden
Авторитет
 
מיני פרופיל
תאריך הצטרפות: Apr 2006
הודעות: 2,556

mayden לא מחובר  

הפתרון בציטוט שלך:
קוד:
you must use
the "Transitional" document type to get the "target" attribute
אתה צריך להשתמש ב:
קוד:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
            "http://www.w3.org/TR/html4/loose.dtd">
וזה יעבוד, ואתה עכשיו משתמש בSTRICT, וSTRICT אינו תומך בזה.
__________________

ציטוט:
" זוכרים בשביל ללמוד, יודעים בשביל ללמד, מבינים בשביל לתכנת.."
  Reply With Quote
ישן 09-06-07, 15:04   # 3
darkid
חבר בקהילה
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
הודעות: 324

darkid לא מחובר  

כל שאר העיצוב מותאם ל STRICT...

אבל נבדוק, דקה.

עריכה:
צצים לי עשרות שגיאות אחרות עכשיו...

Last edited by darkid; 09-06-07 at 15:06..
  Reply With Quote
ישן 09-06-07, 15:07   # 4
somebody
A Al Alm Almo Almog!
תודה על תרומתך!
 
somebody's Avatar
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
מיקום: hadera CiTy
גיל: 35
הודעות: 4,005
שלח הודעה באמצעות MSN אל somebody

somebody לא מחובר  

אין כזה דבר target.
הוא ירד בתקן.

אתה צריך לעשות משהו חלפי.
למשל פונקציה ב JS שתעשה את העבודה.
__________________
דוא"ל: almog.zimel ב ג'מייל נקודה קום
מסנג'ר: almog שטרודל freetopsite נקודה co נקודה il

  Reply With Quote
ישן 09-06-07, 15:10   # 5
Daniel
אחראי פורום
 
מיני פרופיל
תאריך הצטרפות: Mar 2007
הודעות: 2,875

Daniel לא מחובר  

HTML קוד:
<a href="LinkToOpenInNewWindow" onclick="window.open('URL');">Link</a>
  Reply With Quote
ישן 09-06-07, 16:20   # 6
somebody
A Al Alm Almo Almog!
תודה על תרומתך!
 
somebody's Avatar
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
מיקום: hadera CiTy
גיל: 35
הודעות: 4,005
שלח הודעה באמצעות MSN אל somebody

somebody לא מחובר  

ציטוט:
<a href="LinkToOpenInNewWindow" onclick="window.open('URL');">Link</a>
לפי מה שעשית, מה שיקרא פשוט זה לפתוח חלון חדש, ולעבור לחלון אחר.
וחוץ מזה שאם תגיד לו לשים void(0);, כדי שזה לא יעבור, אז הבעיה תיהיה שזה לא יהיה טוב למנועי החיפוש, והם לא יוכלו לאנדקס את הכתובות.

אני ממליץ לך לעשות ככה:

HTML קוד:
function NewWin(URL)
{
window.open(URL);
return false;
}

<a href="http://www.fre.co.il" onclick="return NewWin(this.href);">aa</a>
פונקציה פשוטה, שמקבלת את הערך של HREF, ופותחת אותו בחלון חדש.
היא מחזיקה FALSE, כדי שהחלון הנוכחי, לא יעבור לכתובת של HREF גם כן.

THIS.HREF= הערך של HREF, אתה לא צריך לשנות אותו, הערך הזה מלא כבר ב HREF של אותו A.
__________________
דוא"ל: almog.zimel ב ג'מייל נקודה קום
מסנג'ר: almog שטרודל freetopsite נקודה co נקודה il

  Reply With Quote
ישן 09-06-07, 16:13   # 7
mlnn
משתמש - היכל התהילה
 
mlnn's Avatar
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
מיקום: בחדר של חני
גיל: 35
הודעות: 4,417

mlnn לא מחובר  

הבנתי שבגרסא הבאה רוצים להחזיר אותו =\
__________________
.

בחורות ערומות
  Reply With Quote
השב

חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים)
 


חוקי פירסום
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is מופעל
סמיילים הם מופעל
[IMG] קוד מופעל
קוד HTML מכובה

קפיצה לפורום


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

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