|
What you have will work in IE, but not Firefox. Someone will no doubt say this is because FF is w3-compliant and IE isn't or some such nonsense, but don't believe them: it's a bug.
The fix is twofold:
First, add a "return false;" to stop FF posting the page back to itself:
window.location.href=link;
return false;
Second, note that if running this script locally you will need to make your link absolute (http://...) but when running on a live web server a relative link will work.
cheers
Fred
|
|
|
|
|
Thanks Fred,
Well you are correct it was bug from the browser, It doesnt work for FireFox and older versions of IE also, but works for IE7.
Thanks again
Cheers
Menon
|
|
|
|
|
hi there,
i hav created a web service (converts currencies) wel its working fine at my system, but when i try to access it from some other machine, it gives an exception and in its detail all i understand is " this service is to test on local machine only" how to resolve this prob??
i want to access it from remote location??
help plz...
i m faisal
|
|
|
|
|
Have you installed a web server, like IIS, on your machine?
If you use the built in web server in Visual Studio, that can only be used on the local machine.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
yeah..IIS is installed on that machine.
but still having problems
i m faisal
|
|
|
|
|
hello to all
I put one datalist in the form and there puting one textbox. data is bind from the database into the textbox. i want to disable textbox by using java scirpt ?
|
|
|
|
|
You can disable the textbox by using the Javascript below..
var txt = document.getElementById('textbox');<br />
txt.disabled = ture;
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
|
Yups, use publish web site and uncheck the option "Allow this site to be updatable".
/// -------------------------
Braulio Díez
tipsdotnet.com
/// -------------------------
|
|
|
|
|
Thanks for your reply. Can you write the steps from the beginning?
|
|
|
|
|
I require to create a Web Setup project in VS.NET 2005 that I am interested not to give the Source code to client. Please give the idea how to create.
Thanks in advance
|
|
|
|
|
I am declard a field name as date of birty - data type as date
now I get a date in a textbox as dd/mm/yyyy format. but
sqlserver as mm/dd/yyyy format
how can i store into a table as my getting value as dd/mm/yyyy
Please give me a source code in vb
thanking you
abglorie
|
|
|
|
|
If you pass the date as a parameter rather than trying to inject it into the SQL String you won't have to worry about date formats.
It will also give you an extra benefit of protecting you against SQL Injection Attacks.
And this appears to be a database question - Why isn't it in the SQL Forum?
|
|
|
|
|
This is a presentation issue. SQL Server stores date in a particular format. You can change the format when selecting data. Use CONVERT function to format date.
|
|
|
|
|
hello abglorie,
in the database change the datatype of the datefieldname as varchar(50)
u will get or in the query write it as
select convert(varchar(10),getdate(),101) or 103
ok byee
murali
|
|
|
|
|
yesterday Mr.John sir has helped me in one issue which is related to the same task
code---
else if (txtHospitalName.Text== "Medb" || txtHospitalName.Text== "Medw")
{ FileInfo thefile1 = new FileInfo(Server.MapPath("RtfFilesPath") + "\\voice\\" + txtOriginalName.Text.Trim() + ".wav");
if (thefile1.Exists)
{
File.Copy(Server.MapPath("RtfFilesPath") + "\\voice\\" + txtOriginalName.Text.Trim() + ".wav", Server.MapPath("RtfFilesPath") + "\\voice\\" + txtFilename.Text.Trim() + thefile1.Extension);
GetData();
}
hello frns
the above is the snippet of code i used in my application what i am doing is copying a file and saving it with the someother name its working fine, but the actual problem is i'll be having two types of files in my folder one is .mp3 and .wav .
so in the above code i am checking only the .wav file
note: i'll be entering only the name of the file without extension, there may be any one of the two filetypes.
what are the modifications/additions i have to make in my code to check for two types of file extensions
thanks for ur replies in advance
|
|
|
|
|
sunilwise wrote: FileInfo thefile1 = new FileInfo(Server.MapPath("RtfFilesPath") + "\\voice\\" + txtOriginalName.Text.Trim() + ".wav");
if (thefile1.Exists)
{
File.Copy(Server.MapPath("RtfFilesPath") + "\\voice\\" + txtOriginalName.Text.Trim() + ".wav", Server.MapPath("RtfFilesPath") + "\\voice\\" + txtFilename.Text.Trim() + thefile1.Extension);
GetData();
}
<br />
FileInfo thefile1 = new FileInfo(Server.MapPath("RtfFilesPath") + "\\voice\\" + txtOriginalName.Text.Trim() + ".wav");<br />
<br />
if (!thefile1.Exists){<br />
thefile1 = new FileInfo(Server.MapPath("RtfFilesPath") + "\\voice\\" + txtOriginalName.Text.Trim() + ".mp3");<br />
}<br />
<br />
if (thefile1.Exists)<br />
{<br />
File.Copy(Server.MapPath("RtfFilesPath") + "\\voice\\" + txtOriginalName.Text.Trim() + ".wav", Server.MapPath("RtfFilesPath") + "\\voice\\" + txtFilename.Text.Trim() + thefile1.Extension);<br />
GetData();<br />
}
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
thanks for u r answers sir its working fine
|
|
|
|
|
how to convert date time day from text datatype
for example text field=2007/11/13,04:38:14:859
and i want to convert this text(2007/11/13) into date formate Like(13 Nov 2007- Tuesday ) in MSaccess
please help
Piyush Vardhan Singh
|
|
|
|
|
use like this
date.ToString("DD/mm/yyyy")
can solve ur problem.
Devjit Das.
|
|
|
|
|
or plz go through this link.
http://idunno.org/archive/2004/14/01/122.aspx
Devjit Das.
|
|
|
|
|
Hi All,
I have a secure certificate, and I want to use it to secure ONLY the login.aspx page. So, I need the user to make a request for http://localhost/protectedpage.aspx, get redirected to https://localhost/login.aspx, and once logged in, get redirected back to the protectedpage.aspx using http.
I have the code in place to do all this redirecting stuff, but the problem is that, once the user has been redirected back to the orignal page (protectedpage.aspx) after logging in, they get sent straight back to login.aspx as they are still deemed to be NOT logged in on http:// requests. If I change the url to request the protectedpage.aspx using https, it goes in no problem.
It is as if forms autentication only authenticates the user for the protocol used in the initial request to the login page.
Can anyone help me to understand what is going on here, and suggest what I can do about it?
Many thanks,
Martin
|
|
|
|
|
Hi i asked this question my pre msg...,
But in that post our guys & seniors not get whats the probs exactly...,
So i am posting here some what briefly,So plz u guys dont say its a cross post & lengthy...,
Advance Thanks For all...,
My question follows here:
I am want to bind some datas in my hashtable...,
I have some records in my datatable...,
Example:
mainId Maindesc PNo Link_Tit Link
1 Admin 134 Admin Form1..aspx
2 Gen.M 106 Maste frmPr.aspx
3 Hum.R 165 HR123 frmwo.aspx
4 Salar 201 HRsal frmsa.aspx
7 Cashe 126 Cashe frmCa.aspx
8 Chequ 159 Cheqy frmch.aspx
9 Bills 161 Cash1 frmca.aspx
dt = mydataset.Tables(0)
From that i bind one field(Maindesc) values in arraylist(ts.tabtext)...,
Dim _Text As ArrayList = New ArrayList
For Each dr As DataRow In dt.Rows
If Not _Text.Contains(dr("MainDesc").ToString) Then
_Text.Add(dr("MainDesc").ToString)
End If
Next
ts = CType(Me.FindControl("TabStrip1"), JQD.TabStrip)
ts.TabText = _Text
Now based on that arraylist text values it have to bind another field(PNames) values to hashtable...,
Dim _SubTabText As Hashtable = New Hashtable
_Text = New ArrayList
For Each tabtextobj As Object In ts.TabText
Dim tabtext As String = tabtextobj.ToString()
Dim drs() As DataRow = dt.Select("MainDesc='" + tabtext + "'")
Dim _SubText As ArrayList = New ArrayList
For Each dr As DataRow In drs
_SubText.Add(dr("Link_Title")).ToString()
Next
_SubTabText.Add(drs(0)("MainId") - 1, _SubText)'In this place binding in hashtable it have to be bind on that ts.tabtext based
Next
ts.SubTabTextCol = _SubTabText
But in that hashtable binding is not binding based on the arraylist text...,
Still that 4th MainId i can able to bind MainDesc and its Link_Title records properly..,
After that Mainid 5th & 6th is not there so its binded 7th,8th,9th MainDesc...,
But here that Link_Title are not binded based on that Maindesc row...,
Its left that 7th & 8th mainid, Link_Title...,
After that its binded that 7th mainId Link_Title In 9th mainId...,
Its my probs...,
Plz Any One give me some solution for this to bind based on the proper format...,
-- modified at 7:26 Tuesday 13th November, 2007
Regards,
Mageshh
|
|
|
|
|
HMagesh wrote: After that its binded that 7th mainId Link_Title In 9th mainId...,
Its my probs...,
Is it your probs?? What is your problem?? Are you getting this error "object reference not set to an instance of object"?? Which line are you getting this error?? I really don't understand what you are trying to say... BTW, don't bold the code.. use "code formatting" for pasting the code here..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Hello Michael,
Thanks For Ur reply...,
See i have given some what good format here...,
In my Datatable I have This Records:
Id Name Dep
11 Mage Mca
11 Mage Mba
12 Sami MCom
13 Ravi BSC
16 Resh BCA
17 Gani BTech
18 Mani BA
dt = mydataset.Tables(0)
In that Name I dont want repeat Same Name and i have to bind in arraylist..,So i did my code as:
Dim _Text As ArrayList = New ArrayList
For Each dr As DataRow In dt.Rows
If Not _Text.Contains(dr("Name").ToString) Then
_Text.Add(dr("Name").ToString)
End If
Next
ts = CType(Me.FindControl("TabStrip1"), JQD.TabStrip)
ts.TabText = _Text
Now Based On the Arraylist Name i want to bind Dep in hashtable...,So i did code as:
Dim _SubTabText As Hashtable = New Hashtable
_Text = New ArrayList
For Each tabtextobj As Object In ts.TabText
Dim tabtext As String = tabtextobj.ToString()
Dim drs() As DataRow = dt.Select("Name='" + tabtext + "'")
Dim _SubText As ArrayList = New ArrayList
For Each dr As DataRow In drs
_SubText.Add(dr("Dep")).ToString()
Next
'Here based on that Id i am binding Dep...,Still Ravi Its binded properly in that hashtable...,
'After that its binded that Mani Name Dep as BCA...,and its not bind any Dep in Name Of Resh & Gani
_SubTabText.Add(drs(0)("Id") - 1, _SubText)
Next
ts.SubTabTextCol = _SubTabText
I hope u guys understand what i am asking...,
If any one knows solution,help me to solve...,
Regards,
Mageshh
|
|
|
|