|
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 )
|
|
|
|
|
ya.how to avoid those odd fonts?
is their any other way to do the same so that only standard font names should appear in the dropdownlist?
Now I have to populate 2 different dropdownlist's with standard font size and colour.can you guide me to do the same?
Regards
Vidhya
|
|
|
|
|
vidhyap wrote: how to avoid those odd fonts?
By building a standard list that you store in your web app and using that instead.
vidhyap wrote: Now I have to populate 2 different dropdownlist's with standard font size and colour.can you guide me to do the same?
There's no such thing as 'standard color', you can list any colors you like. The standard sizes are 8,10,12,14, etc. I think it differs by font. if you want to get that complex. What are you trying to do ?
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 )
|
|
|
|
|
I m just creating one page which is used by admin who will select the font name,size and colour for all the other remaining pages which is used by the users or clients.
Regards
Vidhya
|
|
|
|
|
Hi,
I am using Payment Gatway where I am passing value to that gatway.
But I want to pass multiple value to payment gatway.
I have arraylist where I am sending details to that gatway.
But the query string accepts one values at a time.
Through Hidden field it is possible but I am not getting it.
The code is here
arr is the arraylist which contains price and product name.
for (int i = 0; i < arr.Count; i++)
{
pname = arr[i].ToString();
i = i + 1;
price = arr[i].ToString();
Response.Redirect("http://ww11.aitsafe.com/cf/add.cfm?userid=D4162580&product= " + pname + "&price=" + price + "&shipping="+lbl_shipcost);
}
Code using Hidden Field is
Where should I use this code
Thanks
|
|
|
|
|
I don't see how a hidden field would help. I have to wonder what you're thinking with this code. You create a loop, but you build the whole URL and redirect on the first iteration. Build the URL in the loop, so that it has all the query string values you need, THEN redirect.
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,
That's why I am saying that getting only first value and pass to query string is not useful. I want to send all the products and their price to gatway.
By passing one value to query string is working. Because it takes one value at a time.
But I want to send multiple values.
Thanks
|
|
|
|
|
You're either saying that you don't understand why redirecting with one value only doesn't work ( in which case, you need to buy a book if you can't see why having a redirect in a loop only passes one value ), or you're complaining that the gateway you're using doesn't support what you want ( in which case, there's nothign we can do about it ).
I would expect if you build a URL with multiple values on it, it would work. If it doesn't, then the gateway does not support it, so what can we do about that ?
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 )
|
|
|
|
|
Hello friends,
I build a dll in my application using class library project.
And in web application i add reference it is also showing in the bin folder and application directory.
but on the page.aspx.cs file when i try to import this with "using " keyword i am not able to do this.
I am not finding the classes in the application.
Plzz help me wht to now...
Thanks in advance..........
Deepak Nigam
|
|
|
|
|
Did you add a reference to the dll in the project?
|
|
|
|
|
Does the dll belongs to same solluation file?
please check the reference that you have added.
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
Is there a way to get SharePoint to not preserve the state of a variable?
I want to be able to refresh the screen and have the previous value destroyed so the process knows to start with a fresh application state.
This is a SharePoint Web Part included with other web parts on an asp webpage. The SharePoint server renders the page so I don't have access to the page load events.
|
|
|
|