|
Member 4546507 wrote: ;if use ant database;
What does this mean ?
There's an article on this very site on writing a POP3 server.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
This is by far the most badly written post.
Please explain so we can understand you
|
|
|
|
|
hi..
i'm creating textboxes and imgebttn dynamically inside a table using javascript. i set some properties for the textboxes. but how can i bind 'onclick' events to the button. The code i used is below.
//for textbox
var txtA=document.createElement("input");
txtA.type = 'text';
txtA.id ='a'+lastrowIndex;
txtA.name ='a'+lastrowIndex;
txtA.className='textbox';
txtA.readonly='readonly';
//for imgbtn
var txtC=document.createElement("img");
txtC.id ='c'+lastrowIndex;
txtC.name ='c'+lastrowIndex;
txtC.className='images_del';
txtC.src="Images/delete_16x16.gif";
// txtC.setAttribute("onClick","alert('Ok')");//this is not working
Thanks in advance.
|
|
|
|
|
use the following
txtC.Attributes.Add("onClick",
"javascript:alert('Ok')");
.....
|
|
|
|
|
i want to bind the event, when its created.. not in the pageload. bcose its creating dyn using javascript...
|
|
|
|
|
SamRST wrote: // txtC.setAttribute("onClick","alert('Ok')");//this is not working
Chage it...
txtC.onClick = function MyClick()<br />
{alert('Ok');}
Hi,
Hope u ll get it.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
modified on Friday, May 9, 2008 1:38 AM
|
|
|
|
|
i cannot do this in pageload event, bcose i'm creating adding this control dynamic (no page reloading).
|
|
|
|
|
What's wrong with txtC.onclick = "alert('OK');" ???
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
there z no error, but event is not firing.. !!!
|
|
|
|
|
I believe it's meant to be all lowercase
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
what all i tried is.
txtC.setAttribute("onClick","alert('Ok')");
txtC.setAttribute("onclick","alert('Ok')");
txtC.setAttribute("onClick", "javascript:alert(this.id);");
txtC.setAttribute("onclick", "javascript:alert(this.id);");
txtC.onClick = "javascript:alert(this.id);";
txtC.onclick = "javascript:alert(this.id);";
txtC.onclick = "javascript:alert('Ok');";
|
|
|
|
|
Has to use event handler ...
txtC.onclick=doSomething;
function doSomething(e) {
alert('Ok');
}
.....
|
|
|
|
|
Thanks You So much my lovely GUY...
Its Worked...
Great work.. Dear...
i used ...
txtC.onclick = function(){ImageId(this.id);};
function ImageId(i)
{
alert(i);
}
|
|
|
|
|
Cheers
.....
|
|
|
|
|
have you tried this
var ele = document.getElementById('abc');
ele.onclick = showalert;
function showalert() {
alert('a');
}
--------------------
Check my other javascript posts
|
|
|
|
|
Hi there,
I'm having a webpage which has img control and i want to set alt message for that, but the message would be changable. So i want to put it in some class file. Below is my code but it's not working. Can u please suggest what i can do?
<img border="0" id="ImgHeader" alt="<%= HardCodedValues.HeaderText %>" style="height: 185; width: 760" />
and my class file is:
public class HardcodedValues<br />
{<br />
public static string HeaderText = "2K Billing";<br />
}
Regards n Thks
Sam.M
|
|
|
|
|
What does 'not working' mean ? What do you get ? I'd expect this to work.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
The error which i'm getting is:
Compiler Error Message: CS0103: The name 'HardCodedValues' does not exist in the current context
Source Error:<br />
<br />
<br />
<br />
Line 24: <div align="center"><br />
Line 25: <a href="http://www.2kmobilelink.com" target="_blank"><br />
Line 26: <img border="0" id="ImgHeader" alt="<%= HardCodedValues.HeaderText %>" src='<%= ConfigurationManager.AppSettings["ImagePath"]%>2KMobileLinkHeader.jpg'<br />
Line 27: style="height: 185; width: 760" /></a><br />
Line 28: <br />
<br />
Regards n Thks
Sam.M
|
|
|
|
|
Ah - if you don't put your codebehind class in a namespace, I think the compiler invents one for you. Put the codebehind ( and thus the aspx reference to the class used ) in the same namespace as HardCodedValues
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Sorry, i don't understand. Can u please give me some sample code
Regards n Thks
Sam.M
|
|
|
|
|
In your ASPX
replace
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Request.Master" CodeBehind="CaseNotes.aspx.cs" Inherits="CaseNotes" %>
with
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Request.Master" CodeBehind="CaseNotes.aspx.cs" Inherits="MyNamespace.CaseNotes" %>
and in your code behind replace
public partial class CaseNotes : Page
with
namespace MyNamespace
{
public partial class CaseNotes : Page
Now, make sure that MyNamespace is the same as the namespace for your HardCodedValues class.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
I have one dropdownlist box,i have to populate this dropdown with standard font names as its list items.I am new to this asp.net.
can anybody help me to do this its urgent.
Regards
Vidhya
|
|
|
|
|
vidhyap wrote: can anybody help me to do this its urgent.
Oh, but of COURSE it is.
Where do you want the font names to come from ? You can't access te font names on the client machine. Do you want to use a standard list ( may as well hard code it ), or get a list from the server, of the fonts there ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi Graus,
thanks for your reply,i just want to use standars font names.I tried using Fontcollection and fontfamily class.now i am able to populate the dropdownlist with fontnames.
I did the following coding:
<br />
System.Drawing.Text.InstalledFontCollection fontcollection = new InstalledFontCollection();<br />
<br />
<br />
foreach (FontFamily fonts in fontcollection.Families)<br />
{<br />
ddlFontName.Items.Add(fonts.Name);<br />
}<br />
hey can u just guide me is it ok.actualy its working fine.
Regards
Vidhya
|
|
|
|
|
It looks like it should work fine. Just remember, if your server has any odd fonts on it, they will also appear
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|