|
Hi,
This is not firing in Mozilla firefox..
if (document.selection)
{
alert("abc");
}
what is the equalant function for Firefox can u clear me plz.....
Regards,
kannak
kannak
|
|
|
|
|
|
Hi,
I tried that link ..its working fine in IE but not working in Firefox..
my problem is also like that ...the Javascript function is working in IE
but not working in FIREfox
regards,
kannak.........
kannak
|
|
|
|
|
Hi
Here is your code below
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Selection Test Page</title>
<script language="javascript" type="text/javascript">
function foo() {
var selObj = window.getSelection();
alert(selObj);
var selRange = selObj.getRangeAt(0);
}
</script>
</head>
<body onmouseup="foo()">
Select some of the text in document. Select text and see the result.
</body>
</html>
Cheers
Prosanta Kundu
|
|
|
|
|
Hi,
I will clearly explain my requirement , Listbox and textbox in my page..listbox having 5 rows...when i select any data from the listbox , the selected data should copied and pasted to the Textbox...for i use Javascript method ...its working fine in IE but not working in Firefox..the javascript method as follows..can u please check it out why its not working in Firefox..
function insertTextFun() {
if (document.selection)
{
document.getElementById("<%= txtExprsn.ClientID %>").focus();
var sel = document.selection.createRange();
var varname = document.getElementById("<%= lsbFunction.ClientID %>");
sel.text = varname.options[varname.selectedIndex].text;
}
else if (txtExprsn.selectionStart || txtExprsn.selectionStart == '0') {
var startPos = txtExprsn.selectionStart;
var endPos = txtExprsn.selectionEnd;
txtExprsn.value = txtExprsn.value.substring(0, startPos) + lsbFunction[lsbFunction.selectedIndex] +
txtExprsn.value.substring(endPos, txtExprsn.value.length);
}
else
{
txtExprsn.value += lsbFunction[lsbFunction.selectedIndex];
}
Am calling this function onclick method of the listbox..
Thanks in Advance,
kannak.......
kannak
|
|
|
|
|
Hi
here is your code
<pre>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Selection Test Page</title>
<script language="javascript" type="text/javascript">
function insertTextFun() {
if (document.selection)
{
document.getElementById("txtExprsn").focus();
var sel = document.selection.createRange();
var varname = document.getElementById("lsbFunction");
sel.text = varname.options[varname.selectedIndex].text;
document.getElementById("txtExprsn").focus();
}
else if (window.getSelection()) {
var input = document.getElementById("txtExprsn");
var varname = document.getElementById("lsbFunction");
var start = input.selectionStart;
var end = input.selectionEnd;
var insText = input.value.substring(start, end);
input.value = input.value.substr(0, start) + varname.options[varname.selectedIndex].text + input.value.substr(end);
input.selectionStart = start;
input.selectionEnd = (start + varname.options[varname.selectedIndex].text.length);
input.focus();
}
else
{
txtExprsn.value += lsbFunction[lsbFunction.selectedIndex];
}
}
</script>
</head>
<body >
<select id="lsbFunction" size=5 onclick="insertTextFun()">
<option value="function1">function1</option>
<option value="function2">function2</option>
<option value="function3">function3</option>
<option value="function4">function4</option>
<option value="function5">function5</option>
</select>
<textarea id="txtExprsn" rows="10" cols="40">
This is an example of [bla bla bla] selection.
</textarea>
</body>
</html>
</pre>
Cheers
Prosanta Kundu
modified on Thursday, January 28, 2010 5:04 AM
|
|
|
|
|
Hi,
Thanks u for your response, i will use this code......
regards,
kannak......
kannak
|
|
|
|
|
Hi,
I have a question for which I have yet to figure out an answer:
I have a page with three webpartzones, one zone on each row of a three-row
table. I have the layoutorientation property set to horizontal (LayoutOrientation="Horizontal") so that the webparts will be added side by side. Is there any way to have the webparts wrap in the zone? Currently, I have the webpartzones set to 100% width to take up all available room in the table cell. When you add webparts, the zones keep expanding like this:
* * * * * *
Instead, I'd like the webparts to expand to the right and then wrap with
the reach the right-side of the window, like this:
* * *
* * *
Any help regarding this issue will be appreciated.
Thanks in advance..
|
|
|
|
|
i have a control
<asp:hiddenfield id="h1" value="" runat="server">
in javascript on click of a button i am
function menuclicked() {
if (myname == 'aruna') {
document.getElementById("<%=h1.ClientID%>").value="hidden";
alert(document.getElementById("<%=h1.ClientID%>").value);
}
}
on code file i am accessing the hidden field as
if (!IsPostBack)
{
str =h1.Value ;
}
but i am getting the value as null. Can anyone please help me with this.
|
|
|
|
|
Are you getting the text "hidden" in the javascript alert?
|
|
|
|
|
yes but could not get in code file.
|
|
|
|
|
Disclaimer - I have never used asp:HiddenField, I prefer the HTML input field. But I'm assuming HiddenField and input type hidden work the same way.
Is there any other post back happening between the javascript and the server code execution? I mean are you posting the form to the server from the javascript or are you doing it on different events?
|
|
|
|
|
Hi,
It Has to work...check it out ...settings of browser stuffs and all..
I tried your same problem i got the value from server side in both IE
and firefox....
regards,
kannak...........
kannak
|
|
|
|
|
Hi all,
Does anybody know a way of playing a sound when an event occurs. Please don't give me the embed and GDSOUND (or whatever) stuff...
I need something that can play a sound when an updatepanel refreshes, or a timertick event occurs, or any event occurs...
I found this LiveSound stuff, but that's WAY too expensive ...
ANY help would be much appreciated, cause I can't find anything ... and i've been looking for a few days now ... I'll do ANYTHING for a way to do it ....
C# please...
Kind regards,
Hugo
|
|
|
|
|
|
I've seen this before ...
I think I might just user the old school method and go with something like:
StringBuilder SetSoundScript = new StringBuilder();
SetScrollPositionScript.AppendLine("<script language='javascript' event='onload' for='window'>");
SetScrollPositionScript.AppendLine("</script>");
ClientScript.RegisterClientScriptBlock(typeof(String), "setSound", SetSoundScript.ToString());
I HATE THIS WAY ! Why can't LiveControls just be FREE !
|
|
|
|
|
Dear All
where can i find open source ASP.Net CRM
Hussain Mohammed Saleh Attiya
ISP Technical Manager
Atyaf Telcom - Bahrain
|
|
|
|
|
Google
Bob
Ashfield Consultants Ltd
|
|
|
|
|
i know
i could not find free
i want free
Hussain Mohammed Saleh Attiya
ISP Technical Manager
Atyaf Telcom - Bahrain
|
|
|
|
|
|
Hi ,
I have used crystal Report in my asp.net application .
but when i installed this application in another machine then it will give
error like this :
The type 'CrystalDecisions.Web.CrystalReportViewer' exists in both 'c:\WINDOWS\assembly\GAC\CrystalDecisions.Web\9.1.5000.0__692fbea5521e1304\CrystalDecisions.Web.dll' and 'c:\WINDOWS\assembly\GAC_MSIL\CrystalDecisions.Web\10.2.3600.0__692fbea5521e1304\CrystalDecisions.We b.dll'
The type 'CrystalDecisions.Web.CrystalReportViewer' exists in both 'c:\WINDOWS\assembly\GAC\CrystalDecisions.Web\9.1.5000.0__692fbea5521e1304\CrystalDecisions.Web.dll' and 'c:\WINDOWS\assembly\GAC_MSIL\CrystalDecisions.Web\10.2.3600.0__692fbea5521e1304\CrystalDecisions.We b.dll' c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\payroll\c0a99628\fd366e1e\App_Web_wqgkxfgd.4.cs
The type 'CrystalDecisions.CrystalReports.Engine.ReportDocument' exists in both 'c:\WINDOWS\assembly\GAC\CrystalDecisions.CrystalReports.Engine\9.1.5000.0__692fbea5521e1304\Crystal Decisions.CrystalReports.Engine.dll' and 'c:\WINDOWS\assembly\GAC_MSIL\CrystalDecisions.CrystalReports.Engine\10.2.3600.0__692fbea5521e1304\C rystalDecisions.CrystalReports.Engine.dll'
how to solve this .
please give me some solution .
Thanks in Advance ,
Dipal Panchal
|
|
|
|
|
Click "About Microsoft Visual Studio XXXX" u will find Crystal report in installed products. Copy the key and paste that in crystal report and check. It worked for me.
|
|
|
|
|
Hi Peoples,
I am using crystal report in my asp application.
In which i have design the report separately.
I am loading the report with help of the report document.
ie
ReportDocument.Load("Report Name");
ReportDocument.DataSource(Datatable);
CrystalReportViewer1.ReportSource = ReportDocument;
If my reports page setup is potrait, the viewer is taking the height as
1013px as default and if it is lanscape it is taking 788px as default.
Due to this there is lot of spaces coming in my page.
How to set this report viewer as its height should associate with its report document?
i am using CrystalDecisions.Web Version=10.2.3600.0
and i am facing the same with Version=10.5.3700.0 also
Help me thanks in advance.
|
|
|
|
|
i have used a datalist control in webpage and placed a imagebutton in the datalist and wrote onClick="Add_friend" .But when i click on that imagebutton , onClick event is not firing.
|
|
|
|
|
hi sir,
please help me
sir please send me the java script for accessing the record from server like ajax.i mean i want to replace my ajax with java script.
sir please send me the java scipt for ajax in asp.net for textbox control.
|
|
|
|