<![CDATA[
<!DOCTYPE html>
<html>
<head></head>
<body>
<div id="TextPrefix">></div>
</body>
</html>
<style type="text/css">
#TextPrefix {
font-size:12pt;
font-family:Georgia, serif;
display:inline-block;
width:12px;
float:left;
vertical-align:bottom;
}
#txtCommand {
border:none;
font-size:12pt;
font-family:Georgia, serif;
}
input:focus {
outline:none;
}
#endWaitLink {
font-size:12pt;
font-weight:normal;
font-family:Georgia, serif;
color:black;
}
a.cmdlink {
text-decoration: none;
color: black;
cursor: text;
}
</style>
]]>
div#txtCommandDiv {
border:none;
font-size:12pt;
font-family:Georgia, serif;
}
input#txtCommand {
outline:none;
border:none;
}
<script>document.getElementById('txtCommandDiv').innerHTML = '> <input type="text" x-webkit-speech="" id="txtCommand" onkeydown="return commandKey(event);" style="width: 680px;" autofocus><a id="endWaitLink" onclick="endWait();" class="cmdlink" style="display: none">Continue...</a>';</script>
input#txtCommand {
outline:none;
border:none;
font-size:16px;
margin:0;
padding:0;
}
Sora574 wrote:"jaynabonne"
JS.eval("$('#txtCommandDiv').prepend('> ')");
Gah... So much I still have to learn.
I thought you couldn't change HTML with jQuery?
$("#MyDiv").html(blah blah blah);
JS.eval("document.getElementById('txtCommand').placeholder='';")
guzmere wrote:Nice one Jaynabonne
Hi I've managed to be able to get rid of the background in the text box but as you say you would need some sort of flashing cursor to highlight the text box. Also I placed the coding in the print a message box is there another way to do it permanently, because every time you clear the screen you have to call on it again.
<html><head><style type="text/css">div#txtCommandDiv {border:none; font-size:12pt;font-family:Georgia, serif; } input#txtCommand { outline:none; border:none; background:transparent}</style></head></html>
Happy Adventuring Terry
AddExternalStylesheet(GetFileURL("HTMLTest.css"))
function addExternalStylesheet(source) {
var link = $("<link>");
link.attr({
type: "text/css",
rel: "stylesheet",
href: source
});
$("head").append(link);
}
AddExternalStylesheet("res://local/style.css")
AddExternalStylesheet(GetFileURL("style.js"))
jaynabonne wrote:You can also just add this to your start script (make sure it's inside a CDATA):JS.eval("$('#txtCommandDiv').prepend('> ')");
But as Sora said, the style is wrong. Stay tuned... (I hope)
<div id="txtCommandDiv" style="display: block; ">
<div>> </div>
<input type="text" x-webkit-speech id="txtCommand" onkeydown="return commandKey(event);" placeholder="" autofocus style="font-family: Georgia, serif; color: black; font-size: 12pt; background-color: white; width: 680px; background-position: initial initial; background-repeat: initial initial; ">
<a id="endWaitLink" onclick="endWait();" class="cmdlink" style="display: none">Continue...</a>
</div>
.<div style="display: inline-block">> </div>
and that did the trick, until I deleted my script for changing the txtCommand width... Then it went back to the same thing as before. So I added it back and it worked. It's weird because I only set it for 1px lessJS.eval ("$('#txtCommand').width('679px');")