|
I'm trying to work out what the question is. You know this post will be lost forever, and no-one will ever read it, in a few hours ?
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 )
|
|
|
|
|
form1.aspx
<br />
under html<br />
<script language="javascript" type="text/javascript"><br />
function calendarPicker(strField)<br />
{<br />
window.open('DatePicker.aspx?field=' + strField,'calendarPopup','width=250,height=190,resizable=yes');<br />
}<br />
</script><br />
<br />
<a href="javascript:;" onclick="calendarPicker('Form1.txtEventDate');" title="Pick Date from Calendar">pick</a>
for the calenderpicker.aspx
Private Sub Calendar1_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar1.DayRender<br />
<br />
e.Cell.Controls.Clear()<br />
<br />
<br />
Dim Link As System.Web.UI.HtmlControls.HtmlGenericControl<br />
Link = New System.Web.UI.HtmlControls.HtmlGenericControl<br />
Link.TagName = "a"<br />
Link.InnerText = e.Day.DayNumberText<br />
Link.Attributes.Add("href", String.Format("JavaScript:window.opener.document.{0}.value = '{1:d}'; window.close();", Request.QueryString("field"), e.Day.Date))<br />
<br />
<br />
If e.Day.IsSelected Then<br />
Link.Attributes.Add("style", Me.Calendar1.SelectedDayStyle.ToString())<br />
End If<br />
<br />
<br />
'// Now add our custom link to the page<br />
e.Cell.Controls.Add(Link)<br />
<br />
End Sub
|
|
|
|
|
Which part of codes are not working ? OR I mean to say when ?
Parwej Ahamad
R & D: REST services with WCF
|
|
|
|
|
for firefox everything works great.
but for ie .. when the popup calendar comes.. i select a date but it does not append to the textbox assign to it.
|
|
|
|
|
Can you post again here that line of code only ? i did find on above post.
Parwej Ahamad
R & D: REST services with WCF
|
|
|
|
|
sorry about that guess i missed the most impt code, i deleted the a href code
a href "javascript:;" onclick="calendarPicker('Form1.TextBox11');" title="Pick Date from Calendar">
|
|
|
|
|
I don't know what you have post here ?
Remember that: If you wants to access the text box value in Javascript
then use Like this-
var obj=document.getElementById('textboxid');
if( obj != null )
var value = obj.value;
I hope it help you !!!
Parwej Ahamad
R & D: REST services with WCF
|
|
|
|
|
sorry those codes are under the html section for a img.
[a href "javascript:;" onclick="calendarPicker('Form1.TextBox11');" title="Pick Date from Calendar"]
so my idea is the on_click will be calling the javascript function. from first post.
another question will i have to overwrite my current script for the one you posted ?
|
|
|
|
|
You problem is in javascript:
function calendarPicker(strField)
{
window.open('DatePicker.aspx?field=' + strField,'calendarPopup','width=250,height=190,resizable=yes');
}
Change as this:
function calendarPicker()
{
var obj=document.getElementByID("TextBoxid");
if( obj != null )
window.open('DatePicker.aspx?field=' + obj.value,'calendarPopup','width=250,height=190,resizable=yes');
}
OR
Pass the text box id as strField
get it in the javascript
Like
function calendarPicker(strField)
{
var obj=document.getElementByID("strField");
.........
.....
}
Parwej Ahamad
R & D: REST services with WCF
|
|
|
|
|
hmm strange now the window does not appear and gives a yellow ! saying object does not support this method.
<script language="javascript" type="text/javascript">
function calendarPicker(strField)
{
var obj=document.getElementByID("strField")
if( obj = !null )
window.open('DatePicker.aspx?field=' + strField,'calendarPopup','width=250,height=190,resizable=yes');
}
</script>
|
|
|
|
|
strField is the Textbox id
If yes :
var obj=document.getElementByID(strField);
//Avoid the double quotes
No
Then find direct with Control id
var obj=document.getElementByID("TextBoxId");
Parwej Ahamad
R & D: REST services with WCF
|
|
|
|
|
after changing to either by control id or passing the id through strField it gives the same error.
|
|
|
|
|
Perhaps if you fix your formatting so we can see all the code ?
The answer is obviously that you're doing something, somewhere, that is done differently in IE. So, you need to find that bit of code, wrap it in a browser check, and write IE specific code as needed.
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 have an image button that opens a file browser on clicking it, but my button always requires 2 clicks and then after it requires only 1 click. how can aviod it to have 2 clicks for the first time.
Here is my html code and the fucntion that it calls after click.
<img id="uploadImg1" class="imgUpload1" src="~/images/upload1.gif" runat="server"
alt="Select file from your computer" onclick="BrowseSingle()" />
here is my js function that should be called onclick:
function BrowseSingle()
{
maxNoOfFiles = 1;
if(browseMode == "bulk")
{
swfu = null;
}
if(swfu == null)
{
SingleUploadObjInit();
}
swfu.browse();
browseMode = "single";
}
|
|
|
|
|
I am not sure, but might be cause of runat="server".
Can you check it as this:
On page load event:
uploadImg1.Attribute.Add("onclick","BrowseSingle()");
Parwej Ahamad
R & D: REST services with WCF
|
|
|
|
|
My VS .Net 2005 web app uses crystal reports.
They are set to use Landscape orientation in the .rpt as well as programmatically.
When the print dialog shows, Portrait is always set.
Anyone have a solution for this?
Also, during my internet searches, I found a possible solution involving c:\windows\microsoft.net\framework\v2.0.50727\asp.netclientfiles\crystalreport\webformviewer3\html\crystalprinthost.html.
It suggested changing a javascript property from pageorientation to paperorientation.
Since then I don't even get the printer dialog, just a "Error in "/" application, resource cannot be found" in a 2" box.
I tried copying the whole folder from another working PC, no change.
I tried uninstall of everything VS, and reinstalling, but it still won't work.
"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."
"There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..."
|
|
|
|
|
Hi Rechard,
I remember report object provides a property like :
oReport.PrintOptions.PaperOrientation = PaperOrientation.Landscape
OR are you looking different thing ?
Parwej Ahamad
R & D: REST services with WCF
|
|
|
|
|
Yes, I've tried that. The print dialog just ignores it and uses Portrait.
"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."
"There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..."
|
|
|
|
|
Sorry Richard !
I never face this kind of problem. It seems like settings are automatically adjust by the print dialog.
It is learning for me.
Parwej Ahamad
R & D: REST services with WCF
|
|
|
|
|
What is strange is if I use the Windows Forms version of the reportviewer, and print, the print dialog sees Landscape like it should.
"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."
"There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..."
|
|
|
|
|
Hi All,
I have a login screen with a header and footer. Once logged in , it will take me to a menu and from there, for every page that I navigate to...... the same header and footer as in the login screen should be visible along with the main menu at the side... How do I do this?
I am using VS2003 and vb.net...
Any help in this regard is highly appreciated.
Regards,
Reena
|
|
|
|
|
Im not sure if you can create master pages in visual studio 2003 but another way is to create a header and footer page i.e header.aspx and footer.aspx and then include them in your files i.e.
We are not a Code Charity
|
|
|
|
|
I'm sorry you have to use VS2003.
Master Pages don't exist yet. I would create a user control for the header and a user control for the footer. Then add the user control to each page.
I didn't get any requirements for the signature
|
|
|
|
|
Better way to implement it;
Create a Header and Footer Web User Control and add it in every page of header and footer area.
Parwej Ahamad
R & D: REST services with WCF
|
|
|
|
|
Hi,
The best solution is using master pages but vs2003 wont support this one. So alternate is create separate user controls for header and footer then you need to register those controls wherever you want.
I think this will help.
|
|
|
|