# Plotting two-variable function as function of one variable with manipulate for both variables

I have a function g(x,y) and would like to plot it as g(x) with a slider to vary y. What I currently have is a g(x,y) plotted as g(x) but with y as a parameter which I can adjust:

Manipulate[Plot[g[x,y],{x,0,10}],{y,0,10}]


That works fine, but now I'd like to be able to vary the upper value of the x-axis so that we can adjust how much of the graph we see (or how much of the x-axis we see). This is what I've tried (but didn't work):

Manipulate[Plot[g[x,y],{x,0,Manipulate[x,{x,0.1,10}]}],{y,0,10}]

-

g[x_, y_] := Sin[y x]

@tukmajerb, it defines the initial value. You should read the documentation, it is really good. Highlight Manipulate and press F1. –  rhermans Mar 26 '14 at 7:27