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

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

   
|!|

השב
 
כלים לאשכול תצורת הצגה
ישן 21-10-12, 13:28   # 1
Resellers.co.il
Permanently Banned
 
מיני פרופיל
תאריך הצטרפות: Jul 2011
הודעות: 289

Resellers.co.il לא מחובר  

קוד ב JAVESCRIPT

זה הקוד JS:
function showhide(id) {
if (document.getElementById(id).style.display == "none") {
document.getElementById(id).style.display = "inline"
}
else {
document.getElementById(id).style.display = "none";
}
}

וזה חלק מה-HTML:
<td><a href="#" onclick="javascript:showhide('picture1');">תמונה 1</a></td>
<td><a href="#" onclick="javascript:showhide('picture2');">תמונה 2</a></td>
<td><a href="#" onclick="javascript:showhide('picture3');">תמונה 3</a></td>
<td><a href="#" onclick="javascript:showhide('picture4');">תמונה 4</a></td>
<td><a href="#" onclick="javascript:showhide('picture5');">תמונה 5</a></td>

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

אני רוצה שנגיד אני ילחץ 1 זה יציג לי את התמונה הראשונה, ונגיד אני ילחץ 2 זה יוריד תראשונה ויציג תתמונה השנייה, ז"א כל פעם תמונה אחרת שאני בוחר
__________________

Resellers.co.il - אירוח אתרים
מקבוצת GlobalSolution ישראל
  Reply With Quote
ישן 21-10-12, 16:22   # 2
bimbim
חבר על
 
מיני פרופיל
תאריך הצטרפות: Feb 2007
הודעות: 857

bimbim לא מחובר  

לפי סדר הלחיצות או לפי סדר התמונות?
  Reply With Quote
ישן 21-10-12, 16:27   # 3
Resellers.co.il
Permanently Banned
 
מיני פרופיל
תאריך הצטרפות: Jul 2011
הודעות: 289

Resellers.co.il לא מחובר  

לפי סדר התמונות
__________________

Resellers.co.il - אירוח אתרים
מקבוצת GlobalSolution ישראל
  Reply With Quote
ישן 21-10-12, 17:05   # 4
eliran2313
חבר מתקדם
 
מיני פרופיל
תאריך הצטרפות: Aug 2011
הודעות: 691

eliran2313 לא מחובר  

תעלה בבקשה קוד html מלא של העמוד שלך.
כמה שיותר מהר בבקשה
__________________
  Reply With Quote
ישן 21-10-12, 17:15   # 5
Resellers.co.il
Permanently Banned
 
מיני פרופיל
תאריך הצטרפות: Jul 2011
הודעות: 289

Resellers.co.il לא מחובר  

<body>
<div id="main">
<div id="menu">
<ul>
<?php include('blocks/menu.php'); ?>
</ul>
</div>
<div id="bg">
<div id="banner-m"></div>
<div id="text">
<p>גלריה</p>
</div>
<div id="paget"></div>
<div id="page">
<table>
<tr>
<td><a href="#" onclick="javascript:showhide('picture1');">תמונה 1</a></td>
<td><a href="#" onclick="javascript:showhide('picture2');">תמונה 2</a></td>
<td><a href="#" onclick="javascript:showhide('picture3');">תמונה 3</a></td>
<td><a href="#" onclick="javascript:showhide('picture4');">תמונה 4</a></td>
<td><a href="#" onclick="javascript:showhide('picture5');">תמונה 5</a></td>
</tr>
</table>
<br>
<table cellpadding="9" cellspacing="6" class="table" align="center">
<tr>
<td class="table" id="picture1" style="display:none;"><img src="http://www.introx-serv.co.il/img/1.png" border="0"></td>
<td class="table" id="picture2" style="display:none;"><img src="http://www.introx-serv.co.il/img/2.png" border="0"></td>
<td class="table" id="picture3" style="display:none;"><img src="http://www.introx-serv.co.il/img/3.png" border="0"></td>
<td class="table" id="picture4" style="display:none;"><img src="http://www.introx-serv.co.il/img/4.png" border="0"></td>
</tr>
</table>
</div>
</div>
</div>
</div>
</body>
__________________

Resellers.co.il - אירוח אתרים
מקבוצת GlobalSolution ישראל
  Reply With Quote
ישן 21-10-12, 17:42   # 6
eliran2313
חבר מתקדם
 
מיני פרופיל
תאריך הצטרפות: Aug 2011
הודעות: 691

eliran2313 לא מחובר  

ציטוט:
נכתב במקור על ידי Shahar Haronian צפה בהודעה
<body>
<div id="main">
<div id="menu">
<ul>
<?php include('blocks/menu.php'); ?>
</ul>
</div>
<div id="bg">
<div id="banner-m"></div>
<div id="text">
<p>גלריה</p>
</div>
<div id="paget"></div>
<div id="page">
<table>
<tr>
<td><a href="#" onclick="javascript:showhide('picture1');">תמונה 1</a></td>
<td><a href="#" onclick="javascript:showhide('picture2');">תמונה 2</a></td>
<td><a href="#" onclick="javascript:showhide('picture3');">תמונה 3</a></td>
<td><a href="#" onclick="javascript:showhide('picture4');">תמונה 4</a></td>
<td><a href="#" onclick="javascript:showhide('picture5');">תמונה 5</a></td>
</tr>
</table>
<br>
<table cellpadding="9" cellspacing="6" class="table" align="center">
<tr>
<td class="table" id="picture1" style="display:none;"><img src="http://www.introx-serv.co.il/img/1.png" border="0"></td>
<td class="table" id="picture2" style="display:none;"><img src="http://www.introx-serv.co.il/img/2.png" border="0"></td>
<td class="table" id="picture3" style="display:none;"><img src="http://www.introx-serv.co.il/img/3.png" border="0"></td>
<td class="table" id="picture4" style="display:none;"><img src="http://www.introx-serv.co.il/img/4.png" border="0"></td>
</tr>
</table>
</div>
</div>
</div>
</div>
</body>
איפה ה js?
אני מבין שעברית זאת שפה קשה.
אנא ממך:
העתק את כל הקובץ, כולל כל הדברים, html css js php וכו' וכו' וכו'
ותדביק אותו בתוך תגיות code של פורום.
תודה
__________________
  Reply With Quote
ישן 21-10-12, 17:46   # 7
Resellers.co.il
Permanently Banned
 
מיני פרופיל
תאריך הצטרפות: Jul 2011
הודעות: 289

Resellers.co.il לא מחובר  

body:
ציטוט:
<body>
<div id="main">
<div id="menu">
<ul>
<?php include('blocks/menu.php'); ?>
</ul>
</div>
<div id="bg">
<div id="banner-m"></div>
<div id="text">
<p>גלריה</p>
</div>
<div id="paget"></div>
<div id="page">
<table>
<tr>
<td><a href="#" onclick="javascript:showhide('picture1');">תמונה 1</a></td>
<td><a href="#" onclick="javascript:showhide('picture2');">תמונה 2</a></td>
<td><a href="#" onclick="javascript:showhide('picture3');">תמונה 3</a></td>
<td><a href="#" onclick="javascript:showhide('picture4');">תמונה 4</a></td>
<td><a href="#" onclick="javascript:showhide('picture5');">תמונה 5</a></td>
</tr>
</table>
<br>
<table cellpadding="9" cellspacing="6" class="table" align="center">
<tr>
<td class="table" id="picture1" style="display:none;"><img src="http://www.introx-serv.co.il/img/1.png" border="0"></td>
<td class="table" id="picture2" style="display:none;"><img src="http://www.introx-serv.co.il/img/2.png" border="0"></td>
<td class="table" id="picture3" style="display:none;"><img src="http://www.introx-serv.co.il/img/3.png" border="0"></td>
<td class="table" id="picture4" style="display:none;"><img src="http://www.introx-serv.co.il/img/4.png" border="0"></td>
</tr>
</table>
</div>
</div>
</div>
</div>
</body>
javescript:
ציטוט:
<script language="javascript">
function showhide(id) {
if (document.getElementById(id).style.display == "none") {
document.getElementById(id).style.display = "inline"
}
else {
document.getElementById(id).style.display = "none";
}
}
</script>
__________________

Resellers.co.il - אירוח אתרים
מקבוצת GlobalSolution ישראל

Last edited by Resellers.co.il; 21-10-12 at 18:14..
  Reply With Quote
ישן 21-10-12, 19:31   # 8
אדיר
עסק רשום [?]
 
מיני פרופיל
תאריך הצטרפות: Mar 2008
מיקום: אשקלון
הודעות: 1,714

אדיר לא מחובר  

בסוף הפונקציה תיצור משתנה שיכיל את האיידי שהועבר אליה,
בתחילת הפונקציה תבדוק אם המשתנה הזה קיים ואם כן תקבע עבור האלמנט עם האיידי הזה display none.
  Reply With Quote
ישן 22-10-12, 16:30   # 9
Resellers.co.il
Permanently Banned
 
מיני פרופיל
תאריך הצטרפות: Jul 2011
הודעות: 289

Resellers.co.il לא מחובר  

ציטוט:
נכתב במקור על ידי xPerfection צפה בהודעה
בסוף הפונקציה תיצור משתנה שיכיל את האיידי שהועבר אליה,
בתחילת הפונקציה תבדוק אם המשתנה הזה קיים ואם כן תקבע עבור האלמנט עם האיידי הזה display none.
אין לי מושג איך לירשום את זה ב JS.
__________________

Resellers.co.il - אירוח אתרים
מקבוצת GlobalSolution ישראל
  Reply With Quote
ישן 22-10-12, 23:52   # 10
IgalSt
מנהל פורום, עסק רשום
 
IgalSt's Avatar
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
מיקום: המרכז
גיל: 38
הודעות: 1,432
Send a message via Skype™ to IgalSt

IgalSt לא מחובר  

ציטוט:
נכתב במקור על ידי Shahar Haronian צפה בהודעה
אין לי מושג איך לירשום את זה ב JS.
קודים מוכנים זה לא פה.
אם אתה רוצה עזרה, תוכל לקבל עזרה ספציפית איך להתמודד עם מה שאתה צריך, אבל עליך להציג רצון ללמוד ולא רק עניין בקבלת הקוד העובד.

כך ש... במה נתקעת?
  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. הזמן כעת הוא 10:04.

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