|
How can I make the script only give me results where if the first character matches the field in the database (access)? I use this code:
If request("postcode") <> "" then
tpostcode = LEFT(request("postcode"),4)
strsql = "SELECT * FROM ledenlijstoverzicht WHERE ( PostcodeBezoekadres LIKE '%" & tpostcode & "%') ORDER BY PostcodeBezoekadres"
set Rs = db.Execute(strsql)
I am not a programmer obviously, but I would appreciate any help.
Thanks,
Yvette
The Netherlands
|
|
|
|
|
Remove the % at the beginning of the search string.
---
b { font-weight: normal; }
|
|
|
|
|
Thank you, thank you, thank you
-- modified at 9:53 Sunday 16th October, 2005
Another "simple" one for you (but not for me:
In the same style, how do I create a search string where an exact match is required?
|
|
|
|
|
If you want an exact match, use a normal comparison (=) instead of like. Then you don't use any wildcards (%).
If you want a more relaxed match (case insensetive) but still match all the characters, simpy remove the wildcards.
---
b { font-weight: normal; }
|
|
|
|
|
I am coding a new site and want to add a facility where I can click on a
link with the text "show example" and when I click the link, it expands a previously hidden <DIV> which follows a <A> hyperlink. When I click the link again, the DIV disappears.
Ideally I would use the CSS :before class attribute and automatically prepend a hyperlink to the start of any DIV with a specific class. Unfortunately IE doesn't support this, so this is how I would like it to appear in my html code:
<a href="javascript:"toggleDiv(this)"> Show example </a>
<div class="SHOWHIDE">this text will show/hide when the link above is
clicked</div>
I know its wrong, but that's the basic idea I'm trying to achieve. Basically what I want to do is, when the link is clicked, the _next_ DIV element is shown/hidden. I know I need to write a function called "toggleDiv" - and the usual code that I see on the internet requires that I give the DIV an "id", and use this id when I call the javascript toggleDiv function.
What I want to do is, pass a "this" reference (or something similar) which basically says, "this" is the ID of the <A> tag that was clicked on....and in the toggleDiv function, I locate the next element (which will be the DIV), and show/hide it using HTML.
in other words, I want to avoid having to give each DIV in my document a unique ID - is it possible to find a solution for this?
thanks,
James
<font size="1" face="Verdana"><a href="http://www.catch22.net"TARGET="_blank"><br>http://www.catch22.net</a></font>
-- modified at 16:59 Saturday 15th October, 2005
|
|
|
|
|
If you can place the link and the div inside another div, it would be quite easy. Something like:
<div class="ToggleHidden">
<a href="javascript:toggleDiv(this);">show></a>
<div class="Info">Some text...</div>
</div>
Then you could get the parent element of the link and change the className property. Use two css classes where one will hide the Info tag inside it:
.ToggleHidden .Info { display: none; }
.ToggleShown .Info {}
---
b { font-weight: normal; }
|
|
|
|
|
hi all..
I use 'try and catch blok' to report errors in asp(with jscript). But I could not find a way that show the error row number in the report. I could only take error message.
is there any way.
karanba
|
|
|
|
|
Hi,
How can I achieve image rollover in Javascript?
I've tried something like this:
function ImageSwap( index, imageID )
{
document.getElementById( imageID ).src = myimages[index].src;
}
function GetImages()
{
for( i = 0; i < myimages.length; i++ )
{
img = new Image();
img.src = "WebForm1.aspx?pointIndex=" + i;
myimages[i] = img;
}
}
But, this line:
img.src = "WebForm1.aspx?pointIndex=" + i;
"i" is the index of the image.
Is this correct line?
How can I get the file name?
Thank you beforehand.
Goran
|
|
|
|
|
What file name is it that you are trying to get? Where are the images?
---
b { font-weight: normal; }
|
|
|
|
|
The images are dynamically created (on the fly) on the server and they are stored in the web application root directory.
The names of the files are like this: ChartPic_000001.png.
|
|
|
|
|
My web page is flickering a lot and I'd like to have those images (5 of them) in array of images to swap them.
I'm getting images here:
I use mouse over event on the client side to swap them:
string scriptString = "onmouseout=\"javascript:document.body.style.cursor='default';\" onmouseover=\"javascript:document.body.style.cursor='hand';ImageSwap(#INDEX,'"+this.Chart1.ID+"');\"";
Chart1.Series[0].MapAreaAttributes = scriptString;
this.Page.RegisterArrayDeclaration( "myimages", Chart1.Series[0].Points.Count.ToString() );
The number of images that I need is 5 and I'd like to have those images in advance, not to call server side code that produces flickering.
|
|
|
|
|
What actually happens? When I move the mouse pointer over the control (which is image dynamically created), the first time generated image disapears and I only have small rectangle with red cross.
|
|
|
|
|
I checked the array and I have 5 images there, but for some reason this doesn't work. Could you help me, please?
|
|
|
|
|
Hi Goran
try this
//swap the images for the buttons
function swapButtonImage()
{
//get the id of the item
var oBtn = window.event.srcElement
var btnId = oBtn.id
var srcImgFolder = "../images/buttons/";
//swap the image
switch(window.event.type){
case "mouseover":
oBtn.src = srcImgFolder + btnId + "_hover.gif";
return;
case "mouseout":
oBtn.src = srcImgFolder + btnId + "_off.gif";
return;
case "mousedown":
oBtn.src = srcImgFolder + btnId + "_pressed.gif";
return;
case "mouseup":
oBtn.src = srcImgFolder + btnId + "_hover.gif";
return;
}
}
// id='oimage1' src='../images/buttons/oimage1_off.gif'
rgds vbturbo
|
|
|
|
|
I have a datagrid and I want when I click on the text in the specified column, this column will be change to the textfield so that I can update the text on it. How can I do this?
Hung
|
|
|
|
|
Do you know how to make the complete column into text field . If yes then make that specified column into text field , then set thye lock property of the text=true , then,on the on_click event. catch the item(i) clicked and make that cell text lock property false...
If still any question you Can Ask
|
|
|
|
|
Can someone kindly provide the regular expression for parsing the text below:
\$Destination #1\~Sheet 1X\~Row 1Y\~Column 1Z\~Long line of text and numbers 123\$
I would like to break the string into components like
Destination #1
Sheet 1X
Row 1Y
Column 1Z
Long line of text and numbers 123
Any suggestions on where to go to learn this stuff
|
|
|
|
|
|
I have a situation with an ObjectDataSource driven DetailsView, where the user is trying to insert a new record. The data for the new record needs to be validated on the server side (especially for validation steps that require calls to the database). If the validation fails (i.e. the user did not enter valid data), how can I cancel the insert /edit appropriately? If I simply cancel the mode change in the ModeChanging event, then I end up with empty fields on the screen. How can I cancel the insert / edit and display the values that the user posted to the server? My problem is especially on the second part. I can cancel the mode change, but I do not know how to retrieve and display the values that the user posted to the server. Does anybody have the answer to this problem? Even if I was to save the posted values to the Session or other repository, how can I programmatically change the values displayed in an ObjectDataSource-driven GridView?
|
|
|
|
|
You can handle ItemInserting or ItemUpdating events and validate data in them
(accessing to posted values is simple: e.Values["columnName"]).
If you see that data is not valid you'll set e.Cancel = true and
insertion/update won't be done.
|
|
|
|
|
The problem is what happened after the insert is cancelled. Does the form display empty fields or does it display the values entered by the user (as would be expected by the user).
|
|
|
|
|
hi ,
i how can protected files in the iis ?
|
|
|
|
|
You can use right management integrated in file system. If you have ASP.NET you can use HttpHandler. It depends on your needs.
|
|
|
|
|
What files, and from what and whom do you wish to protect them?
---
b { font-weight: normal; }
|
|
|
|
|