Click here to Skip to main content
15,921,028 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: create pop up Pin
Shog914-Jan-08 14:58
sitebuilderShog914-Jan-08 14:58 
Generalcreate pop up Pin
ptvce13-Jan-08 22:46
ptvce13-Jan-08 22:46 
GeneralRe: create pop up Pin
Shog914-Jan-08 15:00
sitebuilderShog914-Jan-08 15:00 
QuestionDropdownList and ListSearchExtender, Possible no PromptText? Pin
hifiger200412-Jan-08 16:30
hifiger200412-Jan-08 16:30 
GeneralCreate IM Service to let two applications talk with each other live Pin
ANAS-ANDA12-Jan-08 8:34
ANAS-ANDA12-Jan-08 8:34 
GeneralIE6 CSS stupidity Pin
#realJSOP12-Jan-08 3:09
professional#realJSOP12-Jan-08 3:09 
GeneralRe: IE6 CSS stupidity Pin
Guffa12-Jan-08 10:11
Guffa12-Jan-08 10:11 
GeneralSalam, Javascript Problem onClick event Pin
Mohammed Amine12-Jan-08 0:28
Mohammed Amine12-Jan-08 0:28 
Salam Guys,

I have a small problem right there, here are my 2 small functions in which i'm trying to add two images in each row & set the onclick event of each image to trigger a function depending on the Image Type : I hope you can understand those stuff :
<br />
<html><br />
<head><br />
<title></title><br />
<script type="text/javascript"><br />
<br />
  function AddRow(id){<br />
<br />
    HiddenNumber = document.getElementById("MyHidden").value;<br />
    var Args = AddRow.arguments;<br />
 var tbody = document.getElementById(Args[0]).getElementsByTagName("TBODY")[0];<br />
    row = document.createElement("TR");<br />
 <br />
 var ArgsNumber = Args.length;<br />
 var Minus = ArgsNumber - 1;<br />
 <br />
 for (var i = 0; i &lt; Minus ; i++)<br />
      { <br />
        var td = document.createElement("TD");<br />
        td.appendChild(document.createTextNode(Args[i+1]));<br />
        row.appendChild(td);<br />
    }<br />
 AddImages("C:/wamp/www/Edit.gif",'Edit');<br />
 AddImages("C:/wamp/www/Delete.gif",'Delete');<br />
  <br />
    tbody.appendChild(row);<br />
    HiddenNumber++;<br />
}<br />
function AddImages(Path,ImgType)<br />
{<br />
    var td = document.createElement("TD");<br />
 var MyImg = document.createElement("input");<br />
 MyImg.type = "image";<br />
 MyImg.src = Path;<br />
       <br />
    if (ImgType == 'Delete')<br />
    {<br />
    MyImg.id = "Delete["+HiddenNumber+"]";<br />
    MyImg.onclick = DeleteRow(MyImg.id);<br />
    }<br />
    else if (ImgType == 'Edit')<br />
    {<br />
    MyImg.id = "Edit["+HiddenNumber+"]";<br />
    MyImg.onclick = EditRow(MyImg.id);<br />
    }<br />
    td.appendChild(MyImg);<br />
 row.appendChild(td);<br />
        <br />
}<br />
 function DeleteRow(FrmName)<br />
{<br />
 <br />
       document.write("Salam, This is the DeleteRow function  My Name is "+FrmName);<br />
}<br />
function EditRow(FrmName)<br />
{<br />
       document.write("Salam, This is the EditRow function My Name is : " + FrmName);<br />
}<br />
</script><br />
</head><br />
<body><br />
<input type="hidden" value="1" id="MyHidden" name="MyHidden"><br />
<input type="button" value="Click Here" onclick="AddRow('MyTable','Amine','Yesfi','Assimi','Karim')"><br />
<table border="1px" id="MyTable"><br />
<tr id="FirstRow"><br />
<td id="FirstColumn">FirstColumn</td><br />
<td id="SecondColumn">SecondColumn</td><br />
</tr><br />
</table><br />
</input></input></body><br />
</html><br />
 <br />
this is the page try it Please. the main problem is with the onclick event, there are 2 cases :<br />
 <br />
First :  MyImg.onclick = DeleteRow(MyImg.id); // without qotation markes "";<br />
<br />
the sencond one is MyImg.onclick = "DeleteRow("+MyImg.id+")"; // with the 2 qotation markes "";<br />
 <br />
it drives me crazy Guys, please try your best if you ever have a solution send it to me please i have to deliever the page on time.<br />
 <br />
<br />
Salam <br />
<br />
Mohammed Amine Ouriaghli <br />
<br />
<br />
<br />
<br />


try to be good if you can't be the best

GeneralUpdate Panel Problem Pin
sumanshakya11-Jan-08 4:33
sumanshakya11-Jan-08 4:33 
QuestionAuto Respond Email Pin
Manoj Sahu11-Jan-08 3:17
professionalManoj Sahu11-Jan-08 3:17 
GeneralRe: Auto Respond Email Pin
ScottM115-Jan-08 1:18
ScottM115-Jan-08 1:18 
GeneralC#.net Pin
kiranmaggam10-Jan-08 23:58
kiranmaggam10-Jan-08 23:58 
AnswerRe: C#.net Pin
Guffa11-Jan-08 6:36
Guffa11-Jan-08 6:36 
GeneralOutlook Calendar Sharing via Web Pin
UpdateMe10-Jan-08 15:20
UpdateMe10-Jan-08 15:20 
GeneralRe: Outlook Calendar Sharing via Web Pin
UpdateMe10-Jan-08 18:56
UpdateMe10-Jan-08 18:56 
NewsMIX08 brings Next Web to Las Vegas and you are invited Pin
brucedkyle10-Jan-08 10:33
brucedkyle10-Jan-08 10:33 
QuestionHow to upload a asp.net project to server to make it online. Pin
coolsatty9-Jan-08 20:42
coolsatty9-Jan-08 20:42 
AnswerRe: How to upload a asp.net project to server to make it online. Pin
Expert Coming10-Jan-08 14:58
Expert Coming10-Jan-08 14:58 
GeneralRe: How to upload a asp.net project to server to make it online. Pin
coolsatty10-Jan-08 18:01
coolsatty10-Jan-08 18:01 
GeneralRe: How to upload a asp.net project to server to make it online. Pin
Expert Coming10-Jan-08 19:45
Expert Coming10-Jan-08 19:45 
GeneralRe: How to upload a asp.net project to server to make it online. Pin
coolsatty10-Jan-08 20:41
coolsatty10-Jan-08 20:41 
QuestionSome help on passing a parameter in text HTML? Pin
Ismailc9-Jan-08 20:41
Ismailc9-Jan-08 20:41 
GeneralRe: Some help on passing a parameter in text HTML? Pin
Declan Bright10-Jan-08 3:21
Declan Bright10-Jan-08 3:21 
QuestionRe: Some help on passing a parameter in text HTML? Pin
Ismailc10-Jan-08 22:06
Ismailc10-Jan-08 22:06 
GeneralTroubleshooting application Pin
mcd24249-Jan-08 8:54
mcd24249-Jan-08 8:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.