|
I'm trying to trim dynamic text into my ASP/Javascript using the Left Function, but without any success. Here's my form:
<%
var RecordCounter = 0;
%>
<%
var RepeatCounter = -1;
%>
<% while ((Repeat1__numRows-- != 0) && (!rsPriceMod.EOF)) { %>
>
<% RepeatCounter++;
Response.Write(RepeatCounter + 1)%>. <%=(rsPriceMod.Fields.Item("Part_Number").Value)%><%=(rsPriceMod.Fields.Item("Part_Name").Value)%>
<%=Left(rsPriceMod.Fields.Item("Part_Description1").Value,5,)%> <%Repeat1__index++;
rsPriceMod.MoveNext();
}
%>
The following error message occurs:
Microsoft JScript runtime error '800a138f'
Object expected
/DescriptionMod.asp, line 451
...where line 451 has the left function!
|
|
|
|
|
There is no Left function in JScript. Use the substr or substring method of the String object.
---
b { font-weight: normal; }
|
|
|
|
|
this is what I have in my page:
<% Response.Write((rsPriceMod.Fields.Item("Part_Description1").Value)) %>
Where do I include "substring"?
Thanks.
|
|
|
|
|
Remove the excess parentesis, and apply the method to the value:
<% Response.Write(rsPriceMod.Fields.Item("Part_Description1").Value.substr(0,5)) %>
If the value is not a string at all, you have to convert it to a string:
<% Response.Write(String(rsPriceMod.Fields.Item("Part_Description1").Value).substr(0,5)) %>
---
b { font-weight: normal; }
|
|
|
|
|
i have a web page which has i frame on it and in that frame i have another web pag with controls on it is there a way i can use javascript to set a textbox inside the frame view
chad
|
|
|
|
|
Try this:
parent.html
<script>
function changeText(){
window.myframe.document.childform.mytext.value="hello"
}
</script>
<iframe src=child.html name=myframe></iframe>
<P>
<form name=parentform>
<input type=button onClick=changeText() value="Click Me">
</form>
child.html
<form name=childform>
<textarea name=mytext></textarea>
</form>
|
|
|
|
|
|
example:
main.htm
parent.myframe.document.all.mytext.value="it's my lover";
tt.htm
d
|
|
|
|
|
Hi all,
I'm using Wilson masterpages, One of my pages has datagrid and i need to export its content to excel sheet i tried this code but it generate error due to using Wilson masterpages.
If any one have another way to do the job plz send me
*******************************************************
*Used code:
*******************************************************
*Response.ContentType = "application/vnd.ms-excel" *Response.Charset = ""
*Me.EnableViewState = False 'Turn off the view state.
*Dim tw As New System.IO.StringWriter
*Dim hw As New System.Web.UI.HtmlTextWriter(tw)
*dgrReportRslt.RenderControl(hw)
*Response.Write(tw.ToString())
*Response.End() 'End the response.
********************************************************
Soqrats
|
|
|
|
|
Hi there,
Can you be more specific about the error? As far as I'm concerned, the most common error is that there's a control requiring to be placed in a form tag with runat=server .
|
|
|
|
|
What's Wilson masterpages?
|
|
|
|
|
hi, i need to design by code the columns in a report. the columns data are stored in a database, and i make a filter selection on the table, so the recordest changes, so the number of columns in my crystal report changes. =>
please help me somehow to design by code the columns in my report
thank you
|
|
|
|
|
See the INPUT form element - for search[^]
How in the heck can I get those drop shadow effects inside my elements but not acutally have the element cast the drop shadow...
I need an inside drop shadow???
Thanks
It's frustrating being a genius and living the life of a moron!!!
|
|
|
|
|
The link you gave tells you how to do it. That's what the page is all about.
Cheers,
-Erik
|
|
|
|
|
Hi everyone,
I'm looking for opinions before even starting this new ASP.NET project. In the past, we've usually developed our projects under one Visual Studio project. Now, I'm wondering if it would be better to break up this new project into separate projects. For example, for each content type section of the site, create a new project specifically for that section and have developers work on their particular section. And with that, there would be a top-level project that binds all of these other projects.
I'm just wondering if there would be any type of adverse code management impact , or would this usually be the preferred way to break up a large project that has many different types of content section.
I'm sure this will open up a large can of worms. Any and all opinions are appreciated.
~Brad
|
|
|
|
|
Any ASP.NET project should be at least three projects, the presentation layer, the middle tier, and the data layer. Having your programmers work on multiple projects that represent parts of the presentation layer is a terrible idea, IMO. Doing that without having the seperation of n-tiered development would be even worse.
You put all the files in source control, and each programmer checks out the bit they are working on.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hi all,
i have major issue with the web site i am developing.i have a main page which has some menus and in that main page i have placed an where i will be displaying all the content(there are separate content pages) depending on the menu item selected by the user.but the problem is that i have to set the height of the iframe, but what actually i want is to change the height of the iframe according to the page i load into it.i want all this to avoid the scrollbar for the iframe.
is there any way to do this.
hope to hear from you soon
thanks
Vinod
|
|
|
|
|
This is the absolute oposite to how the iframe is built to work, but you can do it using javascript. Determine the size of the contents of the body, and use that to resize the iframe.
---
b { font-weight: normal; }
|
|
|
|
|
I am trying to use LDAP authentication in ASP. Is it possible, please help.
siddhu
|
|
|
|
|
Hi there,
You can use the IP*Works to connect the LDAP server, then you can authenticate the login user. For more information, you can see an article:
http://aspalliance.com/638[^]
|
|
|
|
|
Hi Thanks a lot, but I am looking out for code in classic ASP (pre-ASP.Net)
siddhu
|
|
|
|
|
Does he have a version for classic ASP?
|
|
|
|
|
I am maintaining some legacy applications written in .ASP.
The problem: they are using the application object to store cache information in. This was fine until these webs were installed on Widnows 2003 which uses the worker processes. This means that the application object is no longer shared on a website level, but on a worker proces level.
Is there anybody that has a solution for this (other than the obvious: move to asp.net and use cache())
I am open for products that can solve this issue as well.
|
|
|
|
|
Hi there,
In IIS6, the worker process isolation mode is selected by default, however, you can switch it back to the IIS 5.0 isolation mode by setting a true value for the metabase property IIs5IsolationModeEnabled . Doing so can make your application work in the same way as with the version 5.x of IIS, however, you cannot take advantage of the improvements provided in IIS6. If it works, it should be used temporarily until you find another solution.
|
|
|
|
|
Thanks, i thought about this solution, but will this not limit the .net functionality used in other sites on the same server?
This settings should have been site-specific; that is what i really need.
|
|
|
|