/    Sign up×
Community /Pin to ProfileBookmark

set cursor at end of text

hi all
im haveing a lot of trouble setting the cursor to the end of the text i have made it so it reloads as you type then puts the cursor in the box but it goes to the start does anyone know how to put it at the end. im still a noob at this stuff

[CODE] <html>
<head>
<title>Test Price List</title>
<link rel=”stylesheet” type=”text/css” href=”admin/site.css” />
<script>
function sf(){document.searcharea.itemsearch.focus()}
</script>
</head>
<body onload=”sf()”>
<?php

include(“admin/connect.php”);
include(“toolbar.php”);

$typesearch = @”$_POST[typesearch]” ;
$itemsearch = @”$_POST[itemsearch]” ;

echo ”
<table border=’0′ cellpadding=’5′ cellspacing=’0′>
<form action=’index.php’ method=’post’ name=’searcharea’>
<tr><td>Item Description:</td><td><input type=’text’ title=’Type The Name Of The Item’ name=’itemsearch’ value=’$itemsearch’ class=’TEXTB’ onkeyup=’this.form.submit()’ /></td>
<td>Type: </td><td><select type=’text’ name=’typesearch’ class=’SELECTA’ id=’typesearch’ title=’Select The Item Type’ onchange=’this.form.submit()’ />
<option value=’$typesearch’>$typesearch &nbsp&nbsp (current)</option>
<option value=’All Items’>All Items</option>”;
include(“admin/type.php”);
echo “</select></td>
<td></td><td></td></tr>
</form></table><br /><br />”;[/CODE]

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @didgydont spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...