<html>
<body>
Click Here
</body>
</html>
Why doesn't this html code go to the website https://account.mojang.com/login when I run the html file?
Unless you click in the link, nothing is going to happen.
To make it go automatically, use:
<script>window.location.href = 'https://account.mojang.com/login';</script>
Related
I am really struggling to use css to make a new homepage for my smugmug website.
I've managed to get this done:
<html style="height:100%">
<body style="height:100%;margin:0;">
<table style="height:100%;width:100%;vertical-align:middle">
<tr>
<td>
<div style="width:100%;text-align:center">
<span style="display:inline-block">WEDDINGS</span><span style="display:inline-block;padding:0 100px">PORTAITS</span><span style="display:inline-block">COMMERCIAL</span>
</div>
</td>
</tr>
</table>
</body>
</html>
and I want to be able to add a link to each word selection. I can't get my head around it, could anyone please help?
Also if anyone is familiar with smugmug, I paste the code into the theme css box and nothing happens when updating my website.
Thank you.
If you were to add a link around the following line:
<span style="display:inline-block">WEDDINGS</span>
place the link tag in front and after it, link tag being
so it would look like this:
<span style="display:inline-block">WEDDINGS</span>
If clicked on, anything between the tag will redirect them to the page.
As a side note, if you wish to make the linked page open in a new tab, use "target=_blank", like this:
I am used to using href="#" during development as placeholder links so that if you accidentally click on it, nothing happens and it will not jump the page around while testing the page i.e. you know exactly which is a placeholder and which is a broken link.
However, When baseurl is defined in the head, href="#" fetches the baseurl address instead of the current page and appends the # at the end. This causes placeholder links to load the index page always. Annoying.
<!doctype html>
<html>
<head>
<base href="http://localhost">
</head>
<body>
<p>placeholder # only</p>
<p>empty string</p>
</body>
</html>
Is there a way to get back the "placeholder" behavior other than specifying the full path in the <a>'s href?
href="javascript:void(0);"
try this, so onclick the page wont jump nor will it be refreshed
This might be more of a hack than anything but you could always just ignore clicks from anchor tags:
$('body').on('click', 'a[href="#"]', function(e) { e.preventDefault(); });
If you are currently in development I suggest removing your base tag.
It defines the behavior of all the anchor tags on that page. For more information :
http://www.w3schools.com/tags/tag_base.asp
do it with javascript:
function onClick(event) {
document.getElementById('id').scrollIntoView({
behavior: 'smooth'
});
}
https://stackoverflow.com/a/48901013/4185912
I am trying to get the mousehover effect in xml, but no idea. However i followed a tutorial from youtube and tried working with html first.
However,I can not see the mouse hover effect .
BY the way I followed this link on youtube.
http://www.youtube.com/watch?v=-jfQeqd0eqc
Please help me out. One more thing I would like to know how can i convert it to xml.That is my final objective at this point.
Here is my html code.
<html>
<head>
<title>Nihar</title>
</head>
<body>
<div>
<img src="wheel.jpeg" onmouseover="src='wheel.jpeg'" onmouseout="src='wheel.jpeg'"">
</div>
</body>
</html>
The images are the same. You have to provide a different image for the onmouseover handler
I'm writing autotests with Watir-WebDriver and Ruby 1.9.2 on Ubuntu for the web. I have some iframe with several elements. I need to click on the items and check what happens. The <iframe> looks like:
<iframe id="iframe" align="top" some_attribute="some_attribute">
<html>
<head>
<title> Some title </title>
</head>
<body>
<div>
<button id="id_button" type="button" class="some_class"/>
</div>
</body>
</html>
</iframe>
When I click on the button, it should create the menu. But when I click on the button with watir-webdriver, nothing happens, as if he did not pressed. Watir don't print any exceptions, but do not press the button.
This problem persists only for Internet Explorer. For Firefox and Chrome, there is no problem. My code looks like:
browser = Watir :: Browser.new (: remote,: url => "http://some_ip:4444/wd/hub",: desired_capabilities =>: internet_explorer)
browser.goto ("http://some_http.com")
browser.iframe.button (: id, "id_button"). click
If I write
browser.iframe.button(: id, "id_button").attribute_value("class")
It's returning "some_class". This indicates that the item is recognized, but still nothing happens.
Please try this code
browser.iframe(:id, "iframe").button (: id, "id_button").click
if you need more information, check this link
http://wiki.openqa.org/display/WTR/Frames
Have you tried using a javascript command?
Eg:
browser.iframe.button(:id, "id_button").fire_event("onclick")
If that doesn't work, try debugging using IRB.
PS: I would write it as follows:
browser.iframe(:id, /iframe/).button(:id, /button/).fire_event("onclick")
Can anyone shed some light to this situation: I have a link that opens in a modal, i add a link and a button that are set to go to the same url. If i click the link, the modal goes to the link, and shows the article properly. If i click the button, it shows the article embedded on the page.
Here's the url, click on newtest2
http://zaazoolive.thewebbusters.com/index.php?option=com_content&view=category&id=1&Itemid=2
Here's the code
<head>
<script type="text/javascript">
function change_url(){
window.location.href="http://zaazoolive.thewebbusters.com/index.php?option=com_content&view=article&id=1:newtest&catid=1:test&Itemid=2"
}
</script>
next
</head>
<body>
<button onclick="location.href='http://zaazoolive.thewebbusters.com/index.php?option=com_content&view=article&id=1:newtest&catid=1:test&Itemid=2'">Next</button>
</body>
</html>
There is a apparent difference, being that the link calls window.location, while the button just sets location, but this is semantically the same.
That popup you got is created by JavaScript. So the link is just used for its url, but when you click it, a script gets executed that loads the content asynchronously and shows it in a popup.
This script does not affect the button (though it could). Find the script that does this and apply it to the button too.
A workaround could be:
<a href="http://zaazoolive.thewebbusters.com/index.php?option=com_content&view=article&id=1:newtest&catid=1:test&Itemid=2">
<button></button>
</a>
Edit: Although it's working, is not a recommended code, as HTML spec clearly says that using tag for item is invalid, so treat this ONLY as a workaround.
P.S. Why are you using <a></a> in section head?