I have done a lot of research before posting it in here. So, here I got few imperfections.my link
Question 1: How do I make CV button to automatically pop-up the pdf resume or cv. So after I get this done, I won't need div saying lorem as a hyperlink.
Under the navigation class:
<li>CV</li>
When I replace #cv from href with a pdf link, the whole website goes wrong.
Thats it for now. Thanks in advance!
Javascript:
<script language="javascript" type="text/javascript">
<!--
function popitup(url) {
newwindow=window.open(url,'name','height=200,width=150');
if (window.focus) {newwindow.focus()}
return false;
}
// -->
</script>
HTML :
<li><a href="" onclick="return popitup('cv.pdf')" >CV</a></li>
Related
i want to show html code in textarea and then user can clink view resut.
code:
<textarea id="html" cols="50" rows="10"><html>
<body>
<p>
This text will appear on your webpage.
</p>
<!--
the text within these comment tags will not appear on the web page
-->
</body>
</html>
</textarea>
<div>
<button onclick="view()">View Results</button>
</div>
<script type="text/javascript">
function view()
{
var result = window.open("", "", "height=400,left=" + ((screen.width) ? (screen.width-400)/2 : 0) + ",top=" + ((screen.height) ? (screen.height-400)/2 : 0) + ",width=400");
var tmp = result.document;
tmp.write(document.getElementById('html').value);
tmp.close();
return false;
}
</script>
i try post it on wordpress post, but not working.
WordPress strips out HTML tags by default. An easy way to begin with would be to use a plugin such as https://wordpress.org/plugins/wp-coder/ to paste your code into and then use a shortcode to run it. Ideally you want to look into building your own plugins, but as a quick fix this will be ideal for you :)
I have a bookmarklet I want people to drag to bookmarks bar. The hings is I'd like to prevent the function is fired if accidentally the bookmarklet is clicked in the web page. How can I do so?
Thanks
<div id="bookmarklet">
Bookmarklet
</div>
Use this:
<div id="bookmarklet">
Bookmarklet
</div>
Or this:
<div id="bookmarklet">
Bookmarklet
</div>
I've corrected the HREF script code since the original would declare a function without executing it.
onclick="alert('this is a bookmarklet');return false"
I solved this way:
<script type="text/javascript">
$('#bookmarklet a').mousedown(function() {
$('#bookmarklet a').attr("href", "alert('mimmo')")
});
$('#bookmarklet a').mouseup(function() {
$('#bookmarklet a').attr("href", "#")
});
</script>
i have a dragable "li" and i use ajax with asp.net. When I start the page drop-drag is working, but when I click the button it doesn't. How can I solve it? All help will be appreciated.
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="jquery-ui-1.7.1.custom.min.js"></script>
<script type="text/javascript" >
$(document).ready(function(){
$(function() {
$("#contentLeft ul").sortable({ opacity: 0.6, cursor: 'move', update: function() {
}
});
});
});
<div id="contentLeft" runat="server">
<ul id="mainOptions" runat="server">
<li id="recordsArray_2" runat="server">2. I am coming.</li>
<li id="recordsArray_1" runat="server">1. How areyou?</li>
<li id="recordsArray_4" runat="server">4. Which is yours?</li>
<li id="recordsArray_3" runat="server">3. This is a book.</li>
</ul>
</div>
<asp:Button ID="btnHelloWorld" runat="server" Text="Update label "
onclick="btnHelloWorld_Click" />
If you have your list inside update panel and script outside of it then $(document).ready will be fired only once when page is loaded. On this first load you set up drag and drop thing on your list.
Later you click a button and content of the update update is updated removing objects that have drag and drop plugins on them and passing fresh new ones from server. If you need to resetup drag and drop you can use page load event from asp.net ajax.
I have a webform on which i display all the details of a particular record now i want to give my client print functionality so he can print those detail. Can this be done in asp.net and if yes then how?
You can use css to specify stylesheets to use for printing. There's not really anything asp.net specific about it - it's handled by the browser.
http://www.alistapart.com/articles/goingtoprint/
Based on what I understood, you want to print part of the page, right?
One option is to use a pop up a new page with content to be printed passed from the current page and let the user print it from the pop up page.
Please refer the following demo:
Print Demo
<script language="javascript" type="text/javascript">
function doPrint()
{
bdhtml=window.document.body.innerHTML;
sprnstr="<!--startprint-->";
eprnstr="<!--endprint-->";
prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17);
prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));
window.document.body.innerHTML=prnhtml;
window.print();
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="WithoutPrint">
This area will not print!
</div>
<div id="Print">
<!--startprint-->
This area will print!
<!--endprint-->
</div>
<input id="btnPrint" type="button" value="Print" onclick="doPrint()" />
</form>
</body>
</html>
Hope it helps...Thanks.
I have a form where the submit function takes several minutes. I'd like to display an animated gif while the submit is cranking. The code below shows the gif, but it doesn't move. What can I do to get it going?
<script type="text/javascript">
$(function() {
$("#submit").click(function() {
$("#wait").show();
return true;
});
});
</script>
<% Using Html.BeginForm%>
<%-- Various input fields here --%>
<input id="submit" type="submit" value="Submit" />
<img id="wait" src="../../Content/images/ajax-loader.gif" alt="" style="display: none" />
<% End Using%>
This problem is happening only in IE, correct? Rick Strahl discussed this on his blog some time back. Be sure to read the comments.
Animated GIF images in hidden page elements
Followig Josh's link I was able to get it to work using:
setTimeout('document.images["loadimage"].src = "../Images/loading_bar.gif"', 200);
In case anybody is still having this issue in IE (and Edge now), I managed to fix the issue by doing the following
Give the following HTML:
<div id="loader" style="display:none;">
<img src="/loading-spinner.gif" alt="Loading">
</div>
and the following Jquery:
function ShowLoadingScreen {
$("#loading-screen").show();
}
adding in the following line fixes the issue:
$("#loader").html($("#loader").html());
so you're left with
function ShowLoadingScreen {
$("#loader").html($("#loader").html());
$("#loading-screen").show();
}