I can display two Twitter boxes next to each other like this, using the Web Helpers package in a Razor 2 asp.net website.
<div id="dynaMashTab-Twitter" >
<span id="spanProfile" style="display: inline-block;vertical-align:top">@Twitter.Profile("jQuery")</span><span id="spanSearch"><span style="display: inline-block;vertical-align:top">@Twitter.Search("jQuery")</span>
</div>
...but I want to be able to dynamically change from "jQuery" to whatever. I've tried this way:
HTML:
<label for="inputQuery" style="display: inline-block;">Enter something, quick!</label>
<input type="text" name="inputQuery" id="inputQuery" placeholder="Enter something already" autofocus style="display: inline-block;" />
jQuery:
$(document).ready(function () {
$("#inputQuery").keyup(function(e) {
if (e.keyCode == 13) {
var inputQueryText = $("#inputQuery").val();
$("#spanProfile").html(@Twitter.Profile(inputQueryText));
$("#spanSearch").html(@Twitter.Search(inputQueryText));
}
});
});
...but I get, "The name 'inputQueryText' does not exist in the current context"
I realize that, even if this works, what I'm assigning to #spanProfile and #spanSearch won't be formatted as before, but I'm starting with baby steps with this and have already taken a bit of a tumble.