Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
i found this template in themeforest site http://designova.net/reveal/preview/.
i try to explore that template and i found link like this:
http://designova.net/reveal/preview/index.html#filter=.blog%3Anot(.blog2),+.post2
can you tell me about this link params
#filter=.blog%3Anot(.blog2),+.post2
i haven't see link like that before.
This site uses jquery-bbq and jquery-isotope.
With jquery-bbq, it parses the url, and gets a result as a filter.
With jquery-isotope and the filter, it filter items in this site with animation. The mechanism of jquery-isotope is:
Filtering: Hide and reveal item elements easily with jQuery selectors.
When the page loads, JavaScript looks at the value after the hash, then updates the view to that filter. The %3A is encoding for a colon, so the filter value is:
.blog:not(.blog2),+.post2
The .blog is a class selector, so look for all .blog that isn't .blog2 then also show the element with a class name of post2.
Try going to the following URLs and you'll see how the content is different:
http://designova.net/reveal/preview/index.html
Show me everything
http://designova.net/reveal/preview/index.html#filter=.blog
Only show me blog posts (elements with a blog class)
http://designova.net/reveal/preview/index.html#filter=.blog%3Anot(.blog2)
Show me all blog posts with a blog class but exclude those with a blog2 class
http://designova.net/reveal/preview/index.html#filter=.blog%3Anot(.blog2),+.post2
Same as the 3rd link, but also show me the post with the class of post2
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
In this table, there is red line.
http://www.data.jma.go.jp/obd/stats/etrn/view/monthly_s3_en.php?block_no=47830&view=1
How can I know if there is red line or not in the table from the html?
url = "http://www.data.jma.go.jp/obd/stats/etrn/view/monthly_s3_en.php?block_no=47830&view=1"
html = urllib2.urlopen(url).read()
soup = BeautifulSoup(html, "lxml")
table = soup.select_one("table.data2_s")
print table
how to detect red line from the program?
This table do not have red line.
http://www.data.jma.go.jp/obd/stats/etrn/view/monthly_s3_en.php?block_no=47831&view=1
I wanted to read both urls above, and test if there is red line or not using the program.
The class-names of the td-s would be a good indicator. Lined td-s have a different class than non-lined. You could check for existence of the class "data_1t_0_0_0" for example.
you could use the iframe like then you could read your iframe content like this:
$('#frame').load(function () {
setTimeout(function () {
alert($('#frame').contents().find('.data_1t_0_0_1l').length);
}, 2000);
});
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I am working on online shopping website like flipkart and want to forward values through request or say just want to append value to URL, But I have not used form so, I can not use form action. For instance consider following situation.
value1<input type="number" min="1" name="value1">
value1
value2<input type="number" min="1" name="value2">
value2
value3<input type="number" min="1" name="value3">
value3
I have three input text associated with three hyper link and if I hit any link then value in respective text-box should appended to URL and we go to next page.
In this case somePage.jsp?Value=2 something like this....
HTML
<a id="reflectedlink" href="http://www.google.com/search">http://www.google.com/search</a>
I will show you with an example, here on keyup event i am dynamically changing href value.
JAVASCRIPT
<script type="text/javascript">
var link= document.getElementById('reflectedlink');
var input= document.getElementById('searchterm');
input.onchange=input.onkeyup= function() {
link.search= '?q='+encodeURIComponent(input.value);
link.firstChild.data= link.href;
};
Check the same in https://jsfiddle.net/aadi/pr5j9Lbv/
You can change the content of the href attribute via JavaScript, as described here.
thanks André I have got my mistake. the problem is solved by your solution, But I have made mistake is I am given same name for all the links....
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to create a dynamic form on my website.
On my site a have several forms that are subject specific but i also have a contact us form with a subject dropdown from which they can choose any of the subjects that the subject specific forms cover.
now if they select website design enquiry i need to ask them for their website address whereas website address isn't relevant to all of the other enquiry subjects, if they ask about website hosting i again need their website address but also need their preference of hosting package.
if they ask about mobile app development i don't need the website or hosting package fields but need 4 checkboxes to appear to allow them to tick the ones relating to the platforms for which the mobile app is to be developed for.
so it needs to be auto adaptive to the type of enquiry selected.
how can i acheive this?
you can use jQuery, to achieve that.
you need to add jQuery change listener on the dropdown select. then you add form elements to a container accroding to selected value.
here is a small example
$( ".select" ).change(function() {
var value = this.val();
if(value == "webDesign")
{
$("#fieldsContainer").append('<input name="webUrl" class="inputField"/>');
}
});
you can also change action url accroding to select Value so it will be more easy to handle different forms
if(value == "webDesign")
{
$("form#myForm").attr('action','process.php?type=webdesign');
}
Your question is quite vague, but the answer to it is that there are many ways to achieve it. One of the most commonly used ways is to use javascript (or some library like jQuery using js).
I have put together a basic function for you that will showcase how it's done in pure js:
HTML:
Services: <select id="service">
<option value="stuff">stuff</option>
<option value="webdesign">webdesign</option>
</select><br />
<span id="webname">Website: <input type="text" /></span>
JS:
document.getElementById("service").onchange = function () {
if (document.getElementById("service").options[document.getElementById("service").selectedIndex].value == "webdesign")
document.getElementById("webname").style.display = "none";
else
document.getElementById("webname").style.display = "block";
}
Here is the demo page of the above code: http://jsfiddle.net/w3pGr/
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I have a contact form with two submit buttons (the buttons both have the same function, apart from one is higher up the page)
Both buttons have validation on them (if a checkbox is not ticked a warning pops up)
IF the submit button that is higher up the page is clicked and the validation not complete, I would like the page to jump to the bottom.
I have tried wrapping the input button with an anchor tag:
t<input type="image" src="http://fc01.deviantart.net/fs71/f/2010/108/c/5/Green_Submit_Button_by_rukiaxichigo15.jpg" onclick="if(!this.form.checkbox.checked){alert('Please read and agree to the terms and conditions first.');return false}" />
and put the anchor code at the bottom of the document:
<a name="seccta"> </a>
... but it doesn't work. It works when I put text in place, but a submit button breaks it.
Instead of wraping the button, put it before or after the button
t<input type="image" src="http://fc01.deviantart.net/fs71/f/2010/108/c/5/Green_Submit_Button_by_rukiaxichigo15.jpg" onclick="if(!this.form.checkbox.checked){alert('Please read and agree to the terms and conditions first.');return false}" />
For the user, it wont make any change, since you will be pointing righ after/before the button. If you need to put a blank character use
Try it
Ok, I added another onclick to the anchor and that has solved my problem:
location.href='#seccta'; if(!this.form.checkbox.checked){alert('Please read and agree to the terms and conditions first.');return false};
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
A part of my code looks like this, a simple hyperlink to an image.
<img src="Logo.jpg" height= "120"; width="280"; />
I would want it such that i can change the link as many times as i want but only through a textbox in another form.
Try this:
href='<%= url %>'
and in code behind:
Public url As String ' is global
in button:
url= TextBox1.Text