So, I want to konw i anyone can help me
I need a html code that does this
A text that can't be changed. Something like: Put youu code here
A invisible pretext link. Something like http://trackyourcode.com/yourcode
Then a text box that the person can write the damn code
then a button tha says GO
when the person press the "go" button it will open a new tab with the pretext link + the person's code
So if the person puts "6584" as code
the link will turn ou like this
http://trackyourcode.com/yourcode6584
Related
Thanks in advance for your help.
I want three buttons to anchor link to a single location (contact form) on a one page website.
Button 1 works, but the other two display missing pages or wrong url.
This is the code:
BUTTON 1:
CONTACT ME TODAY
BUTTON 2:
text hereGET IN TOUCH
BUTTON 3:
text hereCONTACT ME TODAY
LINKED LOCATION:
I hope you can help me. Thanks!
I am trying to make a text-based (With ASCII art) RPG game and I am having trouble with the opening sequences. Here's my script for the opening:
<body>
<pre>
Welcome To __________! <!-- No name yet :P -->
<button onclick="menuButtonPressed1()" type="button">Cool, is this the whole game?</button>
<p id="demo"></p>
<script>
function menuButtonPressed1() {
document.getElementById("demo").innerHTML = "No, there's more!";
}
</script>
</pre>
</body>
This code works fine for getting the button to show the text and all, but what I want to do is make it so that the button clears the current text on screen and changes the button to a different text. For example, what I want is that it says something, but when I press the button it will change the text and the button's text will change too. So if you see: (Ignore the color)
Welcome to ____!
(There will be button here with text "Cool, is this the whole game?")
and you press it you'll clear all the current text on screen and get only: (Again, ignore the color)
Hello to you!
(There is another button here with different text)
If there is something I could add to this to make it easier to understand or easier to answer etc. please tell me so I can correct it. I'm not very good with html yet, so if I might have gotten something completely wrong in my code, I'm sure you can understand.
you should wrap the text in some tag like <p> or <span>. Then give it an ID and use that ID at onClick of button to change that text along with button text.
It just use the same code with different ID.
I have Sublime Text 2. When I begin typing <d a dropdown suggests autocomplete for . Hitting enter will complete the tag and even add the ending tag </div> and place the cursor between the tags. Perfect. If I hit enter again twice, I get this setup:
<div>
|</div>
But now when I go up one row to the blank row in between and hit tab, instead of indenting on the line between the tags, the cursor jumps to the end of </div>.
What I can do is hit enter once when I have <div>|</div> and then hit left to return to the end of <div>and enter again to go to a new auto-indented line.
How do I get this auto-indentation behavior to work when hitting enter in the <div>|</div> situation?
The problem you are having is that when pressing tab your are moving to the next tab stop in the snippet. That is the expected behaviour.
Snippets are tools for helping you write code faster. Those snippets can have multiple cursor positions called tab stops. You move between those positions by hitting tab. So when you hit enter to create those lines, and then tab, you are moving the the next tab stop in that particular snippet.
Sublime Text allows for deep customisation. You could change your auto indent settings, or create your own snippet.
This snippet should do what you are after. Save this as div.sublime-snippet into your User folder (in the packages folder accessed from Preference > Browse Packages) .
<snippet>
<content><![CDATA[
<div>
$1
</div>$0
]]></content>
<tabTrigger>div</tabTrigger>
<scope>source.html</scope>
<description>My own div snippet</description>
</snippet>
After doing this, you will have a new option in that dropdown auto complete menu. Usually you will only have to write div then press tab and voila.
I'd like to create a link that when it is clicked it will open up a some sort of dialog with some text a user can copy.
I was going to use jquery ui dialog for this but I'm wondering if there is something else I should consider?
Ideally I'd like to have that text highlighted so it is ready to copy. Don't think I can do this with jquery dialog?
Any guidance would be appreciated.
Try this :
HTML :
<div id="dialog">
<textarea id="textbox">some text to copy and paste</textarea>
</div>
JavaScript:
$('#dialog').dialog();
$('#textbox').focus().select();
This opens a dialog and then selects all of the text within the textarea. Because the focus function is used you can Ctrl+C straight off as the text is already in focus and selected.
Working demo : http://jsfiddle.net/eZbXD/
Instead of opening a dialog, you can show a textbox in which the link is selected and ready to copy. I have done something like that before. Look at this fiddle. You can remove unnecessary codes and give some style according to your need.
I need to have a piece of text, which looks like a link but actually only calls a handler when clicked. I've first wanted to use an Anchor for that but most website say to not use an anchor if it doesn't have a href, i.e. point to a URL.
So, what's the (semantically) correct way to do this in GWT?
Use a label and style it like an anchor
<g:Label ui:field="theLabelName" />
If you want to fire a history event, use the Hyperlink widget http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/Hyperlink.html
If you just want to fire a random event.. not related to history, use a label like Jan mentioned.
new HTML("My Clickable Text");
Then add the click handler to the HTML