|
i did so but i still have the same problem........this donot solve it
|
|
|
|
|
it works .........there was an error in my code due to which the statement was not working
|
|
|
|
|
now i am facing another problem
i open the dialog form Page1.aspx using
LinkButton2 .Attributes.Add("onclick", "window.showModalDialog('Lookup.aspx?new=new', null, 'status:no;dialogWidth:555px;dialogHeight:575px;di alogHide:true;help:no;scroll:no')");
Now i have an HTML control (input button) in its Clickevent i want to set the value of TextBox1 of the Page1 but when i write
window.opener.document.getElementById('TextBox1').value='ads';
i get the error
document.opener.document is null or not an object
i have also tried
window.opener.parent but it also gives error
How can i do this
|
|
|
|
|
Instead of opener use window.dialogArguments .
LinkButton2 .Attributes.Add("onclick", "window.showModalDialog('Lookup.aspx?new=new', null, 'status:no;dialogWidth:555px;dialogHeight:575px;di alogHide:true;help:no;scroll:no')");
Pass the value of textbox in place of null in the showModalDialog method(second argument).And then use window.dialogArguments from dialog.
Arun J
|
|
|
|
|
Is there any way to get the final dimensions of an ASPX page before it is rendered? I don't mean the size of the browser window (Request.Browser.ScreenPixelWidth...). I mean the complete size of the ASPX page, counting areas that can only be reached via scrollbar -- as in, to get a page to render without scrollbars in the browser I would have to expand my browser viewing areay to X-by-Y pixels...
Or maybe I should explain what my end game is: I want to create a div that overlays my entire ASPX page under certain conditions. When I make an absolute div positioned at 0,0 and sized to 100%, it only creates a div the size of the browser client area. So if my page is scrollable and the user scrolls, I get a nasty cutoff-line where the div ends.
Thanks.
modified on Wednesday, January 30, 2008 5:06:34 PM
|
|
|
|
|
No, that is not possible. The size of the page can only be determined when it's displayed in the browser, and the size can change at any time while it is being displayed if the user changes the settings in the browser.
The size of the page can depend on many variables that you have no control over, like browser type and version, operating system type and version, desktop theme, display settings, font smoothing settings, browser text size, browser zooming, et.c...
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Instead of using absolute in your css, can you use fixed ?
|
|
|
|
|
How cross-browser compatible is that mode? On some website somewhere I read that "fixed" mode exhibits very flaky behavior in IE. I'm running IE 7 and Firefox 2.0, but my client has over 400 clients of their own that use the system, so you know someone out there is going to have some really archaic browser.
I was able to center a small div regardless of scroll position using "fixed" in both IE7 and FF2. However, when I wanted to cover the rest of the screen in a 50% transparent gray cover to make the other div more visible, I encountered an IE 7 issues for which I found a bizzare work-around. The div tag:
<br />
<div runat="server" id="divTest" style="position:fixed; left:0px; top:0px; width:100%; height:100%; background-color:gray; filter:alpha(opacity=60); -moz-opacity: .60;"></div><br />
...seemed to work OK when I had not scrolled the page. However, when I scrolled the page to the bottom and clicked my button to show the div, only the upper half of the screen was covered. So much for "100%". HOWEVER, when I set the width/height styles in my CODE-BEHIND INSTEAD:
<br />
divTest.Style.Add("height", "100%");<br />
divTest.Style.Add("width", "100%");<br />
...then I do get 100% coverage, regardless of page scroll position.
WHATEVER!
|
|
|
|
|
hi,
what is the function of PostBackurl ?
i drag the Button1 Default.aspx and in Default.aspx.cs I intilize a
int i; and
protected void Button1_Click(object sender, EventArgs e)<br />
{<br />
<br />
Button1.Text = "" + i; i++;<br />
}
after site run ,when i click on the Button1 ,Button1.Text show '0'.its ok........ but when i click again it still Button1.Text show '0'.
but i want whenever i press the button1 then int i update every time
.......
|
|
|
|
|
zeeShan anSari wrote: what is the function of PostBackurl ?
MSDN[^] not working in Pakistan today? Or did it just not occur to you to read the documentation?
zeeShan anSari wrote: protected void Button1_Click(object sender, EventArgs e)
{
Button1.Text = "" + i; i++;
}
Where is i defined? Is it a class-level variable? Unless you cache the value of this variable between postbacks, for instance by using ViewState , it will be initialized to 0 on every postback.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
i initialized under :
public partial class _Default : System.Web.UI.Page
then how i can increment the int i value
|
|
|
|
|
zeeShan anSari wrote: then how i can increment the int i value
Use some stateful object. Session, ViewState, Cache etc.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
i cant get the value of any control in the javaScript function
function clickIt(droplist,x)
{
//alert is working
alert('it is step2');
//color of the row 2 which droplist belongs changes
droplist.parentElement.parentElement.style.backgroundColor='#88AAFF';
//HERE IS PROBLEM i Get Undefined in Alert
alert( droplist.parentElement.parentElement.cells[0].value);
}
|
|
|
|
|
You need to find the control via:
document.getElementByid("Codtrolid")
/***********************/
Parwej Ahamad
g.parwez@gmail.com
/***********************/
|
|
|
|
|
Hi All,
I would like to collect some information about the disadvantages of xslt programming. We have made a module frame work (in .net) which accept xsl and data can be returned by using xml.Then it is transforming. We have plan to use this module as much possible but got a chance to read some articles that indicating that xslt will access more memory and cpu usage and thus reduce the perfomance.
It would be really appreciating If anybody can provide me some proper information/guidance in that.And I have read some disadvantages of using ajax in xslt.More details in this topic also wonderful.
Please show me the right way...
Thanks in advance and expecting your reponses,
Rahul..
SoftwareDeveloper(.NET)
|
|
|
|
|
Rahul.P.Menon wrote: I would like to collect some information about the disadvantages of xslt programming.
This question is of too broad a nature to be answered properly within a programming forum. Also, it isn't relevant to the ASP.NET forum. I'm not sure what you mean by 'disadvantages'? XSLT was designed for a specific purpose - performing transformations on XML documents. This could be from one XML schema to another, or to a different document format e.g. HTML or a flat file. It is usually preferable to use XSLT for this purpose rather than a general-purpose language.
Rahul.P.Menon wrote: And I have read some disadvantages of using ajax in xslt.More details in this topic also wonderful.
Without an understanding of what you are trying to do, it's difficult to offer advice. What have you read? How do you want to make use of AJAX and XSLT?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Thanks much for the responses..Let me put more detail to get an exact advice..
For example if we have simple form to submit in our scenarion and see the two possibilities
1) A .net application made and complied and which can read the xsl and transform and shows up the data in an ascx page. So for the above scenario we can use that and develop a xsl to design the form then submit it using a form post and passing the data to the procedure specified in the xml to inserting/updating
2) This way is straight forward as we can design a form using asp.net and compile the code and add the logic to submit.but in this case again need to compile the code is required and if any more changes again compile the code. But in the first way only need to change the xsl file and no compile required.
By considering these two ways which way you will suggest and why...Please count the perfomance measures also while decide a way..That can be a right advice for me for the scenario.
Thank you,
Rahul..
SoftwareDeveloper(.NET)
|
|
|
|
|
Rahul.P.Menon wrote: By considering these two ways which way you will suggest and why...Please count the perfomance measures also while decide a way..That can be a right advice for me for the scenario.
What do you think? I'm not going to tell you what to do. As a developer, you should be able to evaluate different solutions to a problem and make a judgement about which is most appropriate given the circumstances.
Here are some points you might want to consider. What is the relative complexity of the two approaches? Which of them do you, or your colleagues have the technical skills to implement? What time/resources do you have at your disposal, and what do you think you can realistically achieve within their constraints? What are your customer requirements, and how complicated an approach do they warrant?
I don't know anything about your company so I can't answer these questions for you. All I can suggest is that you consider these points when you make your decision.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
I know all these measures and I think finally our discussion went out of scope..I was just searching for the disadvantages of xslt programming as I saw in many articles that it will slow down the perfomance..I was not really looking for the feasibility of the application and the scenario provided is to just make it in detail..
I don't think that my query really needed any company name or SRS to get it answered..Just looking for some responses from those who really knows the disadvantages of xslt. Thats it..
Thank You,
Rahul..
An answer comes from knowledge really differs from the answer which is just build for it
|
|
|
|
|
Rahul.P.Menon wrote: I know all these measures and I think finally our discussion went out of scope..I was just searching for the disadvantages of xslt programming as I saw in many articles that it will slow down the perfomance..I
I don't think the discussion did go OT. You can't discuss the pros/cons of a particular technology without framing the discussion in in some sort of context. The XSLT language was designed to perform transformations on XML documents. It can therefore be considered a preferred tool for such work. Is it the right tool in your ciscumstances. Only you can answer this. You state that you have read documents claiming that using XSLT degrades performance. Have you validated these claims for yourself? Be prepared to challenge assumptions; run your own tests. Performance shouldn't be your only consideration. You may find that an XSLT solution is marginally slower compared to another approach, but the benefits in terms of maintainability far outweigh the costs. Ultimately, you must decide what the best approach based on your own particular circumstances.
Rahul.P.Menon wrote: I don't think that my query really needed any company name or SRS to get it answered..Just looking for some responses from those who really knows the disadvantages of xslt. Thats it..
I'm not interested in the name of your company. My point was that you should choose the technologies that work best for you. Conduct you own evaluation of each approach, considering contextual factors such as time, cost, complexity, maintainability. Then make a decision that you are comfortable with.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Rahul.P.Menon wrote: We have plan to use this module as much possible when appropriate
Not every problem is a nail and therefore not every solution is a hammer.
led mike
|
|
|
|
|
What I want to do is create a templated control to display two dropdowns in different ways. The dropdowns will be doing the same thing, but must look different on different pages.
I'm going for something like this:
<br />
<mycontrols:cascadingdropdowns><br />
<controltemplate><br />
<div>***<dropdown1 />***</div><br />
<div>***<dropdown2 />***</div><br />
</controltemplate><br />
</mycontrols:cascadingdropdowns><br />
where Dropdown1 and Dropdown2 are some properties of type DropDownList. Can anyone tell me if this is possible?
I have gotten up to the point of creating the ControlTemplate property with type ITemplate, andthat works, but I am not sure how to go about making it so I can have the dropdown1 and 2 properties
|
|
|
|
|
Hi,
I am using a javascript onclick function to get values of an input button. Then I am using webservices to input the value in table. This is working fine with IE7,IE6. But not working for Firefox. Part of the code is given below:
function SegmentUpdate(okButton)
{
// Get a refence to the containing cell, it's up a few levels in the DOM
var containingCell = okButton.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;
cancelButtonName = okButton.name.replace('OkButton', 'CancelButton');
cancelButton = document.getElementById(cancelButtonName);
// Get the necessary Id's (They are written on the table data element for this cell).
var segmentId = containingCell.sourceSegmentId; // Here the problem is. containingCell not accepting value in the variable segmentId.
var userId = containingCell.userId;
var languageCode = containingCell.languageCode;
var milestoneName = containingCell.milestoneName;
var contextualLevel = containingCell.contextualLevel;
var isArchived = containingCell.isArchived;
// Get a reference to the relative form elements (Their names are written on the table data element for this cell).
var txtTQMReasonClientId = document.getElementById(containingCell.txtTQMReasonClientId);
var ddlTQMReasonClientId = document.getElementById(containingCell.ddlTQMReasonClientId);
divTargetTextClientId = document.getElementById(containingCell.divTargetTextClientId);
txtOverrideTranslatedTextClientId = document.getElementById(containingCell.txtOverrideTranslatedTextClientId);
txtOverrideTranslatedTextClientId = document.getElementById(containingCell.txtOverrideTranslatedTextClientId);
divPanel2ClientId = document.getElementById(containingCell.divPanel2ClientId);
panel1Id = containingCell.divPanel2ClientId;
// Get the values from the form elements to make the update
var reason = "";
if (txtTQMReasonClientId != null)
{
reason = txtTQMReasonClientId.value;
}
var reasonId = -1;
if (ddlTQMReasonClientId != null)
{
reasonId = ddlTQMReasonClientId.value;
}
var overrideText = "";
if (txtOverrideTranslatedTextClientId != null)
{
overrideText = txtOverrideTranslatedTextClientId.value.trim();
}
ABCD.WebServices.Approval.OverRideTargetSegmentText(segmentId, userId, overrideText, reasonId, reason,
languageCode, milestoneName, contextualLevel, isArchived.toLowerCase(), OnUpdateTargetSegmentComplete);
}
|
|
|
|
|
Do you know at what point your script is falling over (does it error or does it simply not update the DB)? Are your variables being populated before the web service call is made?
Clean code is the key to happiness.
|
|
|
|
|
This is error and hence not updating DB.
No the variables are not populating. The error is with containingCell. This is not extracting related values.
|
|
|
|