Below is what I have come up with So far:
<input type="text" id="Copymachine" onclick="select_all(this)" class="text-center form-control" placeholder="username:password">
I have a button. I can select the text I want from the page, but can not figure out how to now, copy to clip board and paste from clipboard to "New Text Document (3)" a .txt file on my desktop.
In other words I want to be able to click the text thats generate and in one click, highlight it and paste it into a .txt on the desktop.
I was going to add the Java tag. I am unfamiliar with web coding.
You can use this javascript snippet:
<input onClick="this.select();" value="Sample Text" />
But apparently it doesn't work on mobile Safari. In those cases you can use:
<input onClick="this.setSelectionRange(0, this.value.length)" value="Sample Text" />
Related
I tried entering this code in my HTML:
<div>
<input type="file" name="{{ form.forum_image }}" accept="image/*">
</div>
And this produces a site with the usual input file but after that is the text " accept="image/*"></div> What should I do with this so that it doesn't desplay the text? Image of the issue:
.
It looks like you have closed that input tag off early somehow. If you right click on your HTML page in your browser, and choose 'view page source' , you can see how the line is actually being sent. The behavior you show is consistent with the line being something like
<div>
<input type="file" name="image.gif">" accept="image/*">
</div>
If that's the case, you need to take a close look at your template and make sure you don't have a similar typo in there.
I want to show multiple file type option when upload the files.
I refer to this: http://jsfiddle.net/dirtyd77/LzLcZ/144/ .
It works great when only one type of file is appear on the option.
<p>Only show Excel (.xlsx) files...</p>
<input type="file" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ID="fileSelect" runat="server" />
but it will show 'Custom Files' when it has multiple options. as shown in image below.
<p>Show .xls, .xlsx, .csv files...</p>
<input type="file" accept=".csv, .pdf" ID="fileSelect" runat="server" />
Is there any way to show multiple options (1row for PDF, 1row for image, 1row for Excel, etc) in the file type dropdown menu? Instead of showing 'Custom Files'?
hi i have tried this and worked
the problem was the space you have given between the .csv, .pdf
as i thought
<p>MY CUSTOM ONE</p>
<input type="file" accept="image/*,video/*,.pdf,.csv" ID="fileSelect" runat="server" />
here is your updated fiddle work
DEMO code working
I want to have a file upload using php. my problem simple in the CSS I make:
<input name="ufile" type="file" id="ufile" size="50" />
it just show the browse button.
I want to have like a text box with the browse button to show the file address after upload it.
I know that :
<input name="ufile" type="file" id="ufile" size="50" />
will show the text box as will as the browse button but I tried it on firefox and chrome nothing showed just the button not text box. does anybody have any idea about that? why the text box is not shown???
I've tested your html above and it worked in Firefox and IE 9. My guess is that you have some CSS within your webpage that is affecting the file input. You could try use Firebug of developer tools in Chrome to inspect the input to see what css rules are being applied.
So am trying to make an html5 speech button
i want something like that button in Google translate website
http://translate.google.com if you visited the website in chrome you will find a speech to text input the one that Google offers with chrome browsers
so i took a look at the HTML code and i found this
<input id="gt-speech-in" type="text" speech="speech" x-webkit-speech="x-webkit-speech"
x-webkit-grammar="builtin:translate" size="1" lang="en" style="" tabindex="-3">
which does not output a button like it was in translate.google it just outputs a small text input
so how can a change it into a button or make it smaller so it can look like a button?
In Chrome the snippet above does display the input microphone, and you can control the size of the text entry field in the style eg:
<input id="gt-speech-in" type="text" speech="speech" x-webkit-speech="x-webkit-speech"
x-webkit-grammar="builtin:translate" size="1" lang="en" style="width:200px;" tabindex="-3">
Are you trying to get anythng additional to display on the form (or get it to work in a non-Chrome environment)?
Ok so I am new here and was wondering if someone a little more advance then me can help me out.
I have text box on my website with code for user(s) to copy the code that's in the text box and paste the code in Orkut scrapbook which will generate a imagine.
I am using onclick so when user clicks on code it highlight it and then they can copy.
The problems is that you can delete or remove text from within box, if your not careful.
I DONT want the user to be able to delete code in text box. How can I prevent this from happening without removing the onclick scrip.
Please if you could when reply maybe include the sample code above and highlight the new added code so I can see where to make my changes.
I hope I explained this well for anyone to understand!
You can add readonly="readonly" to your textbox tag. Example:
<input type="text" name="someNAme" readonly="readonly" >
you can also try with:
<input type="text" name="someNAme" disabled="disabled" >
Here is a totally editable textbox, and a not editable textbox. The difference is that in the second textbox, there is a readonly attribute, which prevents the user from editing the text. (Run the code snippet!)
function copy(what) {
var copyText = document.getElementById(what);
copyText.select();
copyText.setSelectionRange(0, 99999)
document.execCommand("copy");
}
<textarea id="selectable">This is totally editable!</textarea>
<button onclick="copy('selectable')">Copy this !</button>
<br/>
<br/>
<textarea id="unselectable" readonly>This is not editable!</textarea>
<button onclick="copy('unselectable')">Copy this !</button>