I need to include an image within the <a> tag of an ActionLink. What is the best way to do this?
The final rendered link should look like this,
<a href="/Home/Test"><img src="test.jpg" />Test</a>
In which cases is it better to create template tags (and load them into the template), than creating a context processor (which fills the request automatically)?
e.g. I have a dynamic menu that has to be included into all templates, so I'm putting it into my base.html. What is the preferred usage: context processor or custom template tag? And why?
Hello friends,
How can i prevent user to enter any url or link in contact form text area, i have tried it with this but its not working -
if (!isset($_POST['submit']) && preg_match_all('/<a.*>.*<\/a>/', $_POST['query']))
{
echo "<h1 style='color:red;'>HTML Tag Not allowed </h1>";
}
else {
//sendmail
}
Please help me
I am trying to grab the value of my href in jquery how is it done'?
This is what I have done:
$('#playbackbutton').click(
function() {
$("#playbackdiv").load("$('a:href').val();", [], function(){
$("#playbackdiv").dialog("open");
}
);
return false;
}
I need to get the value of the href in my a tag.
here is the html:
<a href="/record/123.wav">play</a>
I'm trying to change the src of an image form submit button using an onclick, but it doesn't seem to be working correctly. Am I missing something?
<input class="submit_image" id="my_form_button" onclick="$('my_form_button').src='/images/buttons/submitting.gif'" src="/images/buttons/submit.gif" type="image" />
I've also tried using the same JS on the form tag using onsubmit with no luck.
I need to get a list of tags in a text, make their contents bold, and remove them. Can't figure out how to make it.
E.g. with the following input:
foo [b]bar[/b]
The result should be:
foo bar
I use the following code to extract the tags:
Dim matches = Regex.Matches(OriginalRich.Text, String.Format("(\[{0}\])(.*?)(\[/{0}\])", tag), RegexOptions.IgnoreCase Or RegexOptions.Compiled)
Any help would be appreciated.
I was wondering what happens to the code contained in an <mx:Script> tag. If I define a function tehre, it just becomes a member function of the generated class. But I noticed that it seems OK for the compiler if I just write some (static) method calls there (specifically, I call Font.registerFont()). I feel kind of guilty for doing this, because I have no idea what's really happening and when the code gets executed.
I'm created a very large map with many poly areas (over 20 coordinates each) for regions within the map. However, you can't add css to the AREA tag as I was told it's not a visible element. What I want to do is when the user hovers over an area on the map, I want it to be "highlighted" by applying a 1px border to the specific AREA element. Is there a way of doing this? No, I'm not going to resort using rectangles.
I am trying to check if a html document includes script tags that are not empty using regular expressions. The regular expression should match any script tag with a content other than whitespaces or linebreaks.
I have tried
<script\b[^>]*>[^.+$]</script>
but this regex only finds script tags with one space.
In IE the tooltip (title attribute) when you hold over an a-tag disappear after a while. Can I somehow control for long it is shown? Or is it up to the browser to decide?
<a title="tooltip text">link</a>
I'm making the call using the following script which is called on click of an anchor tag
function GetToken(videoId) {
debugger;
var json = $.getJSON("/Vod/RequestAccessToken/"+videoId, function(result){
alert("token recieved: " + result.token);
});
}
In the server application I recieve the call so I know it is a valid URL, but the callback is not being invoked. If i set though the jquery code (f11/f10) the callback is called??!!!?
I have a chunk of content that I load via AJAX and on that page I have a FBML share button. I also tried it without the FBML and just use the hyperlink and script tag. When I load the content directly, the share button loads fine, but when I load it via AJAX, the button doesn't show up. Any ideas on how to get the FB Share button working?
jQuery:
$('.btn.options').click(function() {
$(this).toggleClass('options-on');
$("#options").slideToggle("fast");
});
... works great, but when I enclosed both the buttons and the panel in tag, the panel won't slide up/down anymore?
Thanks for your help!
I've got a window.location function that redirects to a site that is not programmed by me. When the window is relocated I need it to focus on a specific div tag (with an id) within that page. Is there a way for me to do that if the page is not mine and I do not have access to the code?
Which is the better way of using the image as a link..
<A HREF="javascript:password()">
<IMG SRC="pict1.gif" NAME="pic1" ALT="about us!" BORDER="0" align="left"></A>
or the same thing using onClick in the img tag ??
Which one is advisable?? Are both equally good to use??
I would like to know what the first piece of text/html that is currently showing on screen, or more generally where in pixel location a particular tag or piece of text is in the UIWebview. I know that I can use window.pageYOffset to get the scroll position of the UIwebview, but how do I find out what text or HTML item is there?
I'm struggling to find a tag selection UI for a rails app. Ideally it would be something like the selection here on Stackoverflow, or on Delicious or Digg.
I want users to be able to select multiple tags with a single click. We're already using jQuery, so it makes sense to use something that takes advantage of that. I've used the selection ui in jQuery and I'm not thrilled about having users need to hold down ctrl to select multiple tags.
In many prototype scripting cases, it's easier to just stick every form item (such as an input or textarea) in its own form tag. Is there anything wrong that could happen from having lots (like 1000) form tags in a page?
In HTML5, name is no longer a valid attribute of the anchor tag (<a name="yadayada">). It has been mentioned that older browsers do not recognize the the new recommended approach (<a id="yadaya"> or any id for that matter). What are the browsers which don't recognize ids for in page navigation (fragids)? Are we talking about Netscape-era browsers or the usual suspect, Internet Explorer 6?
Tag :Android Development
Hey
i want to display a list of image form url which i will get from xml file. how can i do that plz assist me.
Any knid of help is appriciated
If we keep tag name within selectors.
For example:
#divMainContentBody { … }
.spanImportant { … }
This minimizes the need to switch between your stylesheet and your markup, since the ID and class already tells you what element type it is referring to.
i'm working on a flash widget. But it meet some error problem and the error is described bellow-
1. TypeError: Error #1085: The element type "img" must be terminated by the matching end-tag "".
hi,
how can I fix this problem on Internet Explorer 7:
If I resize the browser window you'll see that the letters of the last tag on the right (in the header) are displayed in vertical one above each other.
This happen only in IE, and not in other browser (you can better see the bug by visiting the website: http://www.sanstitre.ch/drupal/portfolio
How can I ask IE 7 to consider the word as block, and move it to next line instead of listing the letters in vertical ?
thanks
I've got:
<th>First Name<span class="ui-icon ui-icon-arrowthick-1-s"></span></th>
When the user clicks on a th cell, I need to clear the span tag from every one of it's siblings.
$('th').click(function() {
var $th = $(this);
$th.siblings().each